two WordPress - main in root, dev version in subfolder
I got a main site using Wordpress which is set at the root of the domain.
I basically want to have a DEV version of the very same WordPress (using a copy database) in a subfolder, like /dev/
Problem I got is that when I try accessing the dev version, the main WordPress at root seems to trap the request (htaccess?) and gives a "not found" page.
Here's my htaccess at root:
# BEGIN WordPress
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# MultiLingual domain
RewriteCond %{HTTP_HOST} ^(www.)?domain-other-language\.com* [OR]
RewriteCond %{HTTP_HOST} ^(www.)?domain-other-language2\.com*
RewriteRule (.*) http://www.main-domain.com/$1?lang=en [R=permanent,L]
# Alternate domain
RewriteCond %{HTTP_HOST} ^(www.)?other-domain\.com*
RewriteRule (.*) http://www.main-domain.com/$1 [R=permanent开发者_StackOverflow中文版,L]
# this doesn't seem to work
RewriteRule ^dev/$ - [PT,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Try
# BEGIN WordPress
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# MultiLingual domain
RewriteCond %{HTTP_HOST} ^(www.)?domain-other-language\.com* [OR]
RewriteCond %{HTTP_HOST} ^(www.)?domain-other-language2\.com*
RewriteRule (.*) http://www.main-domain.com/$1?lang=en [R=permanent,L]
# Alternate domain
RewriteCond %{HTTP_HOST} ^(www.)?other-domain\.com*
RewriteRule (.*) http://www.main-domain.com/$1 [R=permanent,L]
RewriteCond %{REQUEST_URI} ^dev/
RewriteRule ^dev/.*$ - [PT]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./ /index.php [L]
</IfModule>
# END WordPress
精彩评论