Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Problems with setting 301 Redirect.

  1. #11
    Join Date
    Jan 2009
    Location
    Philadelphia, Pennsylvania
    Posts
    1,797
    This is how to remove http:// and make all urls http:// www
    1. Open Notepad.
    2. Paste this into it,

    PHP Code:
    RewriteEngine On
    RewriteCond 
    %{HTTP_HOST} !^www.SITENAMEHERE.com [NC]
    RewriteRule ^(.*)$ http://www.SITENAMEHERE.com/$1 [R=301,L] 
    3. Replace "sitenamehere" with your domain. Do not edit anything else.

    For example, if you were working on NetBuilders you would just replace "SITENAMEHERE" with "netbuilders".

    4. File - Save As - type in ".htaccess" (without the quotes) into the file name box.
    5. You'll see beneath that another box with the default "Text Document" in it. Change that to "All Files" as seen below.



    6. Now, open your FTP Program (you said you use FileZilla) and paste it into the root directory of your site.

    Examples of the root directory are: public_html or httpdocs - just drag the file into that folder. (The title will depend on the software you're using for your server, but typically it will be public_html.)

    If you're using something like Wordpress (I mention this because I think that's what you're using) you just put it in the same directory as all of your files and folders. (Such as wp-admin, wp-content, wp-includes, etc.)

    If this isn't working, I can upload the file for you if needed.

  2. #12
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Hi this was the code i have given before

    redirect 301 http://newgenresoft.com http://www.newgenresoft.com/index.htm

    Now I have changed it to the above code and uploaded the .htaccess file to the httpdocs folder.

    But give a try with www.newgenresoft.com and newgenresoft.com

    Still it is not redirecting
    Follow me on Twitter: @hendricius

  3. #13
    Can you publish a screenshot of your directory with the names erased or blurred if necessary? That might help a lot.

  4. #14
    Join Date
    Jan 2009
    Location
    Philadelphia, Pennsylvania
    Posts
    1,797
    Are you on an apache server?

  5. #15
    Heh, yeah that might explain it :

    #1 Server Response: http://newgenresoft.com
    HTTP Status Code: HTTP/1.1 200 OK
    Content-Length: 13430
    Content-Type: text/html
    Content-Location: http://newgenresoft.com/Index.htm
    Last-Modified: Thu, 20 Aug 2009 18:35:26 GMT
    Accept-Ranges: bytes
    ETag: "80ca1fcc421ca1:a24"
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    X-Powered-By: PleskWin
    MicrosoftOfficeWebServer: 5.0_Pub

    Date: Fri, 28 Aug 2009 17:01:27 GMT
    Connection: close
    As for IIS, I know how to do the redirect if you have direct access to the server (as in the IIS Manager), but since, I think, you've only got plesk, I'm not sure..

  6. #16
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Quote Originally Posted by Loko View Post
    Can you publish a screenshot of your directory with the names erased or blurred if necessary? That might help a lot.
    Follow me on Twitter: @hendricius

  7. #17
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Follow me on Twitter: @hendricius

  8. #18
    Join Date
    Jan 2009
    Location
    Philadelphia, Pennsylvania
    Posts
    1,797
    Yeah, I also use Plesk so I understand the situation here.
    The problem though, is that your server does not appear to be apache.

    Target NewGenre Software and BPO Solutions
    Server banner Microsoft-IIS/6.0
    Operating system Windows
    Web server IIS 6.0
    Technologies ASP.NET

  9. #19
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Quote Originally Posted by Kovich View Post
    Yeah, I also use Plesk so I understand the situation here.
    The problem though, is that your server does not appear to be apache.
    am not sure buddy, its showing plesk 9.2, while searching in many other resources there all some solutions have been told..but I couldn't find those exact things in my panel
    Follow me on Twitter: @hendricius

  10. #20
    Join Date
    Jan 2009
    Location
    Philadelphia, Pennsylvania
    Posts
    1,797
    Hehe no sir, the problem is not that you're using Plesk.

    The problem is that you have an IIS Server instead of apache. Try reading this:
    Remove WWW. Prefix from URLs with URL Rewrite Module for IIS 7.0 : Keyvan Nayyeri

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Goal Setting
    By Charles in forum Freelancing
    Replies: 24
    Last Post: 9 October, 2011, 00:49 AM
  2. [Free] setting up SB accounts
    By lugaw in forum Services
    Replies: 0
    Last Post: 6 January, 2011, 13:23 PM
  3. setting up blogger in my domain
    By garfish in forum Managing
    Replies: 2
    Last Post: 22 October, 2009, 22:43 PM
  4. Setting up Apache/MySQL/PHP
    By johnting101 in forum Managing
    Replies: 3
    Last Post: 26 August, 2009, 12:53 PM
  5. Trouble setting up phpLD
    By hendricius in forum Directories
    Replies: 7
    Last Post: 21 August, 2009, 14:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •