301/redirect noob...

Discussion in 'Apache' started by Voasi, Jul 24, 2006.

  1. #1
    I'm trying to a simple 301 redirect throught .htaccess and I'm having trouble making it work. The site is hosted at GoDaddy.

    I've tried 2 different types:

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^/aboutus.html http://www.pacificbulletproof.com/about-us/index.html [R=301,L]

    AND...

    RewriteEngine on
    redirect 301 /aboutus.html http://www.pacificbulletproof.com/about-us/index.html

    ...and still I get nothing.

    I know you have to do funny things in the file like "make sure you hit ENTER after you put the code in" ...but I'm not sure I know if that's right.

    Any guidance would be appreciated.

    Thanks!

    - Adam
     
    Voasi, Jul 24, 2006 IP
  2. Voasi

    Voasi Active Member

    Messages:
    1,054
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #2
    I got it. :)
     
    Voasi, Jul 24, 2006 IP
  3. geniosity

    geniosity Peon

    Messages:
    293
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi.

    Could you tell me what you did? I'm struggling with this at the moment.

    Thanks.
     
    geniosity, Aug 12, 2006 IP
  4. Neale

    Neale Peon

    Messages:
    583
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Add me to the list of how did you do that at godaddy ?
     
    Neale, Nov 2, 2006 IP
  5. Neale

    Neale Peon

    Messages:
    583
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Here it is not sure why I could not get this to work earlier
    Copy the following code in to a notepad file
    name it .htaccess upload to the root
    replace yourdomain with site name

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC]
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

    Neale
     
    Neale, Nov 2, 2006 IP