0

我需要

http://somehost.com/?p=whatever&nothis=somevar

要去

http://somehost.com/?p=whatever&this=somevar

只是试图将查询的“nothis”部分更改为“this”!

一直在敲我的头,无法弄清楚!

我需要在这里快速上一课。非常感谢。

4

1 回答 1

0

尝试将此添加到文档根目录中的 htaccess 文件中:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)nothis=somevar(.*)$
RewriteRule ^(.*)$ /$1?%1this=somevar%2 [L]
于 2012-07-28T20:30:27.330 回答