Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将具有查询字符串的 URL 重写为其 SEO 友好名称,即考虑
mysite.com/models?p1=v1
我想将其重写为
mysite.com/models/p1/v1
用户应该在地址栏中看到上述地址。有什么建议吗?
.htaccess应该是:
.htaccess
RewriteEngine On RewriteRule ^models/(.+)/(.+)$ models.php?$1=$2 [NC,L]