开发者

Disable QSA in IIS Mod-Rewrite

开发者 https://www.devze.com 2022-12-16 02:59 出处:网络
So I\'ve got http: //www .domain.com/page.cfm?var=test redirecting to http: //www .domain.com/404.cfm?var=test

So I've got http: //www .domain.com/page.cfm?var=test redirecting to http: //www .domain.com/404.cfm?var=test

I don't want the variable string included in the url at redirect. Kicker is I don't have QSA in the condition.

So is QSA on by default for IIS Mod-Re开发者_开发问答write? If so how can I turn it off?

RewriteRule ^(?:factory_outlets|public_stock_detail)\.(?:html|cfm) http://www.domain.com/404.cfm [R=404,L]


In general you need to specify a query in your substitution like this:

RewriteRule ^(?:factory_outlets|public_stock_detail)\.(?:html|cfm) http://www.example.com/404.cfm? [R=404,L]

But an internal rewrite should suffice:

RewriteRule ^(?:factory_outlets|public_stock_detail)\.(?:html|cfm) /404.cfm [R=404,L]

Furthermore do external redirects always yield in a 3xx response.

0

精彩评论

暂无评论...
验证码 换一张
取 消