[英]htaccess mod_rewrite rule for one parameter
how can I write something like this: 我该怎么写这样的东西:
RewriteCond %{QUERY_STRING} s=(\w+)
RewriteRule ^ wordpress/?s=%1 [L]
I need do rewrite rule from domain.com?s=something to domain.com/wordpress/?s=something . 我需要将规则从domain.com?s=something重写为domain.com/wordpress/?s=something 。
Folder with wordpress is by symlink but It is not interesting. 带有wordpress的文件夹是通过符号链接创建的,但这并不有趣。
Rule what I was send works but makes error 500 on other URLs like domain.com/something?company=1 裁定我发送的内容有效,但在其他URL(例如domain.com/something?company=1)上出现错误500
Thanks 谢谢
Btw: I must send this "body" twice for successful validation. 顺便说一句:我必须发送两次此“正文”以成功进行验证。 Wtf @stackoverflow? WTF @stackoverflow? And why are you cut greeting? 你为什么要打招呼呢?
You just need this single rule: 您只需要以下一条规则:
RewriteEngine On
RewriteRule ^/?$ wordpress/ [L]
Original query string is automatically copied over. 原始查询字符串将自动复制过来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.