WordPress的htaccessredirect破坏我的非www到wwwredirect
在我的根域我有一个.htaccess redirect非www到www,并redirect到一个子目录 (包含一个临时网站)。 这是使用以下代码完成的: Options +FollowSymLinks RewriteEngine On # non-www to www, exclude localhost RewriteCond %{HTTP_HOST} \. RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # temp redir to subdir-wordpress RewriteRule ^$ /subdir [L] 在子目录下使用以下.htaccess运行一个Wordpress安装程序: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /subdir/ RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . […]