Forum Moderators: phranque

Message Too Old, No Replies

301 Redirect

301 Redirect Not Working

         

tonya1

6:33 pm on Aug 29, 2005 (gmt 0)

10+ Year Member



I have tried everything, I cannot get my pages to redirect.
I am trying to do this through the .htaccess file. I'm trying to redirect my non-www pages to www. (domain.com to www.domain.com) I would like all my pages to redirect to www. This is the version my webhost server is on is
.V08 Apache/1.3.26(Unix)mod_fs 6.005 This is the code i'm using:

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

Can someone please advise?

[edited by: jdMorgan at 9:11 pm (utc) on Aug. 29, 2005]
[edit reason] Example.com. [/edit]

jdMorgan

9:15 pm on Aug 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



tonya1,

Welcome to WebmasterWorld!

There's nothing wrong with your code, so a few questions:

Do you get an error message in the browser?

If so, what do you see in your server error log?

Have you flushed your browser cache (Temporary Internet Files) so that your browser can't show you an old previously-cached copy of the page you expect to redirect, rather than sending the request to your server? (If the request is not sent to your server, the code to perform the redirect will never be invoked.)

Jim

tonya1

11:57 pm on Aug 29, 2005 (gmt 0)

10+ Year Member



Yes, I flushed my internet browser, I get an 500 internal server error. My hosting company say that don't know what the problem is(can you believe that) My site seems to be showing dup content htt://example.com.com and the www version, i don't want to get penalized, so I don't know what to do, can you advise?

[edited by: jdMorgan at 1:10 am (utc) on Aug. 30, 2005]
[edit reason] No URLs, please. See TOS. [/edit]

jdMorgan

1:09 am on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you get an error message in the browser?

If so, what do you see in your server error log?

Jim