我有一个wordpress网站,但想在其中一个文件夹中有另一个微型网站。
www.example.com = 主站点www.example.com/shop = 新站点
但是在主站点上,我打开了漂亮的永久链接,我如何为"商店"破例。下面不起作用。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index'.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{REQUEST_URI} ^/shop
RewriteRule . /shop/index.php [L]
在对重写和 .htaccess 进行了更多的挖掘后,这段代码最终起作用了......它只是说如果网址是商店停止任何重写
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^shop'.php$ - [L]
RewriteRule ^index'.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress