magento mod 重写不起作用需要帮助(htaccess):)

发布于 2024-10-03 19:07:58 字数 589 浏览 0 评论 0原文

我的情况.....

我有这个网址 http://www.example。 com/index.php/category?catid=3

我想将其重写为

http:// /www.example.com/bikes/3

我在网站上的重写已启用......所以我在网站上有很好的产品网址

,我想要重写的页面是我自己的页面模块 我

我已将其放入我的 htaccess 中,

RewriteRule .* index.php [L]
RewriteRule ^bikes/(\.*)/$ category?catid=$1

尝试过任何类似 1000 个组合的操作,但似乎没有任何效果,我还检查了我的 htaccess 是否正常工作,但确实如此。第一行工作也重定向到谷歌工作。

希望有人能够告诉我我在这里做错了什么?

my situation.....

i have this url http://www.example.com/index.php/category?catid=3

i want to have this rewritten to

http://www.example.com/bikes/3

my rewrites on the website are enabled....so i have nice urls on the website for the products

the pages i want to be rewritten are my own modules for pages with text

i have put this in my htaccess

RewriteRule .* index.php [L]
RewriteRule ^bikes/(\.*)/$ category?catid=$1

i have tried about any thing like 1000 combinations but nothing seem to work also i checked if my htaccess is working but it does.First line works also redirect to google works.

Hope someone is able to tell me what i am doing wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

江心雾 2024-10-10 19:07:58

我这里有这个例子,我想你可以根据你的需要来解决它:

漂亮的URL:/topic-41/favourite-cheese.html
丑陋的网址:/viewtopic.php?t=41
.htaccess:

选项 +FollowSymLinks
重写引擎开启
RewriteRule ^topic-([0-9]+)/[A-Z0-9_-]+.html$ /viewtopic.php?t=$1 [NC,L]

I had this example around here, and I think you can work it out to your needs:

Pretty URL: /topic-41/favourite-cheese.html
Ugly URL: /viewtopic.php?t=41
.htaccess:

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^topic-([0-9]+)/[A-Z0-9_-]+.html$ /viewtopic.php?t=$1 [NC,L]

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