Forum Moderators: phranque
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]
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
[edited by: jdMorgan at 1:10 am (utc) on Aug. 30, 2005]
[edit reason] No URLs, please. See TOS. [/edit]