WordPress seo 问题

发布于 2024-09-30 05:18:31 字数 941 浏览 0 评论 0原文

我需要一些 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

脱离于你 2024-10-07 05:18:31

您可能需要将规则设置为:

RewriteRule ^corporate$ shop/index.php

由于 shop 子文件夹由 WordPress 处理,因此公司重写应该与 WordPress 重写相同(或非常相似)。

另外,您的 wordpress .htaccess 文件中有两次完全相同的规则似乎很奇怪。虽然它不应该引起任何问题,但它是多余的。

You probably need to set your rule as:

RewriteRule ^corporate$ shop/index.php

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文