我承认,我的. .htaccess/regex是我发展中最薄弱的部分。这是个问题,尤其是今天。
我在ASP中有一个客户端的根站点,public_html上的访问应用如下:
RewriteEngine on
RewriteRule ^$ index.php [L]
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico|xmlpdf\.cfm|public|dynamic|googlead5e4138365a1f11.html|sitemap.xml)
RewriteRule ^(.*)$ index.php/$1 [L]
Options -Indexes他们希望在/public_html/ WordPress中安装。显然,.htaccess的递归性质造成了巨大的冲突。问题是,我不完全确定如何解决这种性质的冲突。并不是说这里的任何人都需要审查,但是默认的WP .htaccess是:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>我希望有人能告诉我如何放弃根文件夹对WordPress子文件夹的冰冷抓地力。
谢谢你。
发布于 2014-02-07 18:13:45
这应该是根.htaccess:
Options -Indexes
RewriteEngine on
# skip WP dir
RewriteRule ^inventory(/|$) - [L,NC]
RewriteRule ^$ index.php [L]
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico|xmlpdf\.cfm|public|dynamic|googlead5e4138365a1f11.html|sitemap.xml)
RewriteRule ^(.*)$ index.php/$1 [L]这应该是WP /inventory/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /inventory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>https://stackoverflow.com/questions/21634359
复制相似问题