How to convert querystring to paths URL using mod_rewrite?

后端 未结 1 1867
长情又很酷
长情又很酷 2021-01-26 19:23

I\'m trying to rewrite a URL that has a query string to its SEO friendly name i.e. consider

mysite.com/models?p1=v1

I\'d like to rewrite it to<

相关标签:
1条回答
  • 2021-01-26 20:13

    The .htaccess should be:

    RewriteEngine On
    RewriteRule ^models/(.+)/(.+)$ models.php?$1=$2 [NC,L]
    
    0 讨论(0)
提交回复
热议问题