我是构建反向代理apache的新手。
我有一个像这样的查询字符串:
我想让它看起来像:
我写过:
RewriteCond %{QUERY_STRING]} ^company=(.*)$
RewriteRule ^/some/thing$ /some/thing/%1 [NC,L,R=301]
但RewriteCond和RewriteRule都不起作用。
任何帮助都非常感激。
由于
答案 0 :(得分:0)
您实际上未与%{QUERY_STRING}变量匹配,请从变量中删除] 。
尝试:
RewriteCond %{QUERY_STRING} ^company=(.*)$
RewriteRule ^/?some/thing$ /some/thing/%1? [NC,L,R=301]