0

我正在尝试重定向 /cgibin/webdata_pro.pl?_cgifunction=form&_layout=jobs.pl

http://compliancesearch.com/compliance_jobs.html

在jobs.pl之后通常有一个查询字符串。我尝试了很多东西,包括:

RewriteEngine on 
RewwriteRule /cgibin/webdata_pro.pl?_cgifunction=form&_layout=jobs.pl(.*) http://compliancesearch.com/compliance_jobs.html [L,R=301]
4

1 回答 1

0

You can't match against the query string in a RewriteRule. You need to use the %{QUERY_STRING} variable.

RewriteEngine on
RewriteCond %{QUERY_STRING} _cgifunction=form&_layout=jobs.pl
RewriteRule ^cgibin/webdata_pro.pl http://compliancesearch.com/compliance_jobs.html? [R=301,L]

The better place to do this, however, is probably in the webdata_pro.pl script.

于 2012-06-23T03:51:58.760 回答