RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?lizhenyu.com$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?lizhenyu.com$
RewriteRule ^(/)?$ wordpress/ [L]

eg.蓝色为域名,红色为二级目录

转载请注明来自 LiZhenyu.Com五百年
本文地址:http://www.lizhenyu.com/edit-htaccess-will-bind-two-top-level-domain-directory.html
分类: 代码