Im having a problem with a htaccess rewrite rule on a site im working on.
Main Dir's htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^website.com [NC]
RewriteRule ^(.*)$ http://www.website.com/$1 [R=301,L]
This site forces the user to www.website.com, even if they enter the address sans t开发者_StackOverflow中文版he www.
Now i have a wordpress install on a sub-directory, who's htaccess is this:
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
The problem, is that whenever i try to access the wordpress directory, i get forced to a www-less address. If i go to www.website.com/blog, i get redirected to website.com/blog.
This of course is hurting my ability to work with sessions/cookies between the two. Anyone have any ideas why this is doing this, or how to fix it?
Under wordpress > settings, you have the non-www address in the blog address field - it is wordpress doing the redirect
精彩评论