PDA

View Full Version : 301 htaccess www redirect not working


gatorenvy
06-14-2010, 10:39 AM
I am trying to set up:
gatorenvy.com/forums/index.php to redirect to
www.gatorenvy.com/forums/index.php but it is not working.

I placed this in the .htaccess in /forums/ where I have VB installed.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^gatorenvy.com/forums [nc]
rewriterule ^(.*)$ http://www.gatorenvy.com/forums/$1 [r=301,nc]

I have wordpress installed in my root and it is redirecting fine.

Any thoughts?

gatorenvy
07-05-2010, 10:52 PM
Anyone have any idea why it's not working? I'm still stuck.

BirdOPrey5
07-06-2010, 01:50 AM
I have my rewrite in the html root, not a folder, so all calls to mydomain.com get changed to www.mydomain.com - maybe that is the issue?

My code is (and works):

RewriteEngine on

RewriteCond %{HTTP_HOST} ^juot.net$
RewriteRule ^(.*)$ "http\:\/\/www\.juot\.net\/$1" [R=301,L]