【发布时间】:2013-07-06 07:26:00
【问题描述】:
我要转换这个网址:
http://ts.thebenamorgroup.com/g2g/category.php?cate=mens
到:
http://ts.thebenamorgroup.com/g2g/category/cate/mens/
我有这个规则,但它不起作用:
Options +FollowSymLinks
RewriteEngine on
RewriteRule category/cate/(.*)/ category.php?cate=$1
RewriteRule category/cate/(.*) category.php?cate=$1
【问题讨论】:
-
你确定你的配置正在被拾取...如果这是 htaccess 尝试扔一些垃圾文本看看 apache 是否甚至尝试解析它。
-
是的,我的 .htaccess 正在工作,我尝试了你的建议
-
你想用哪种方式转换它?您的解释从 ?cate= 到 /cate/ 而您的代码则相反...
-
@SamHuckaby 到这个表格 g2g/category/cate/(任何值)/我不知道什么是失败的
-
您的 .htaccess 文件在哪里?是在g2g文件夹吗?
标签: apache .htaccess url mod-rewrite