开发者

Disable QSA in IIS Mod-Rewrite

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜