.htaccess 如何重定向mysite.com/123类别?orderby=name&;orderway=asc至mysite.com/123-category
在我的网站上是分类页面,例如mysite.com/123-category。当用户对产品进行排序时,url为mysite.com/123 category?orderby=name&orderway=asc。 我需要重写这个链接,比如mysite.com/123-category 在htaccess文件中,我有以下代码:.htaccess 如何重定向mysite.com/123类别?orderby=name&;orderway=asc至mysite.com/123-category,.htaccess,redirect,.htaccess,Redirect,在我的网站上是分类页面,例如mysite.com/123-category。当用户对产品进行排序时,url为mysite.com/123 category?orderby=name&orderway=asc。 我需要重写这个链接,比如mysite.com/123-category 在htaccess文件中,我有以下代码: RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /1451/category.php?id_category=$1 [QSA,L] 现在怎么办?谢谢
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /1451/category.php?id_category=$1 [QSA,L]
现在怎么办?谢谢 无需使用htaccess文件剥离查询参数。只需使用preg_replace功能并将其去掉我仍然有一个问题。我使用prestashop系统,不知道可以编辑哪个文件。