0

私は次のURLを持っています:

http://example.com/directory/proc.php?email=a@b.com&link=http://example.org

「リンク」変数の値には常に http:// または https:// が含まれているため、URL から削除したいと考えています。

だから私は次のようになります:

http://example.com/directory/proc.php?email=a@b.com&link=example.org

4

1 に答える 1

1
RewriteEngine on
RewriteCond %{QUERY_STRING} ^((.+&)?link=)(https?://)(.+)$
RewriteRule (.*) /$1?%1%4 [NC,L,R]
于 2013-06-19T15:10:30.530 に答える