View Single Post
Old 02-03-2012, 12:42 AM   PM User | #1
ubonline
New to the CF scene

 
Join Date: Dec 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ubonline is an unknown quantity at this point
mod rewrite not working

I have a site with a blog in a separate folder, so there is mysite.com and mysite.com/blog.

I'm trying to have all pages go to www. For my main site it works fine. But for my blog it does not. So:

mysite.com redirects properly to www.mysite.com
mysite.com/blog/ stays at mysite.com/blog/ instead of www.mysite.com/blog/

Here is the htaccess code for my main site www.mysite.com:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?virtualpath=$1 [L]
</IfModule>

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


Here is the htaccess in blog directory www.mysite.com/blog/:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?virtualpath=$1 [L]
</IfModule>

Any suggestions?
ubonline is offline   Reply With Quote