magento mod 重写不起作用需要帮助(htaccess):)
我的情况.....
我有这个网址 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我这里有这个例子,我想你可以根据你的需要来解决它:
漂亮的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]