WordPress seo 问题
我需要一些 seo/mod 重写帮助。我的根文件夹中有这个 .htaccess :
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^corporate$ shop/corporate/
所以基本上...如果我直接去
http://chocowrap.ie/shop/corporate
它可以工作,但如果我去
http://chocowrap.ie/corporate
There is another .htaccess inside /shop that is a wordpress install.那.htaccess 有
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>
# END WordPress
什么问题吗? :(
I need some seo/mod-rewrite help. I have this .htaccess in my root folder :
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^corporate$ shop/corporate/
so basically...if I go straight to
http://chocowrap.ie/shop/corporate
it works but not if I go to
http://chocowrap.ie/corporate
There is another .htaccess within /shop that is a wordpress install. That .htaccess has
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>
# END WordPress
whats wrong? :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要将规则设置为:
由于 shop 子文件夹由 WordPress 处理,因此公司重写应该与 WordPress 重写相同(或非常相似)。
另外,您的 wordpress .htaccess 文件中有两次完全相同的规则似乎很奇怪。虽然它不应该引起任何问题,但它是多余的。
You probably need to set your rule as:
Since the shop subfolder is handled by wordpress, the corporate rewrite should be the same (or very similar) to the wordpress rewrite.
Also, it seems odd that you have the exact same rules in your wordpress .htaccess file twice. Though it shouldn't cause any issues, it's redundant.