我的目标是这个网址:
component/users/?view=registration
至:
registration.html
位于.htaccess
网站的 mysite 文件夹中。
我试过这个:
RewriteBase /mysite
RewriteRule ^component/users/?view=registration$ registration.html$ [R=301,L]
但我不工作...
当我尝试这个时:
RewriteRule ^component/users/_view=registration$ registration.html$ [R=301,L]
它工作得很好。
那么如何用问号解决这个问题。我已经读过它不是 URL 的一部分(它是附加的)。我读过我必须使用类似查询字符串的东西,但我并没有真正理解语法。
也许有人可以写出这个问题的解决方案?会很棒=)