【发布时间】:2022-01-12 19:47:12
【问题描述】:
请帮帮我,我有两种情况,例如我有一个要重定向的URL,例如
https://example.com/about-us 我的重写规则是
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ index.php?pageName=$1 [QSA,L]
它适用于所有带有查询 pageName 的页面。
我想将不同的查询字符串重定向到相同的结构,就像我有 URL 一样
https://example.com/index.php?filter=latest
我想将其重定向到与上述关于我们页面相同的格式,例如
https://example.com/latest
这怎么可能?请帮助我,谢谢
【问题讨论】:
标签: string .htaccess url-rewriting rules