Can I include the path and query string in an IIS "Error Pages" redirect?
Posted
by
Dylan Beattie
on Server Fault
See other posts from Server Fault
or by Dylan Beattie
Published on 2012-06-19T21:00:56Z
Indexed on
2012/06/19
21:18 UTC
Read the original article
Hit count: 212
I'm setting up a custom 403.4 handler so that non-SSL requests to my site are redirected to a different URL - and what I'd like to do is to include the script path and query string in the redirect, so that a user who requests http://www.site.com/foo?bar=1
will be redirected to https://www.site.com/foo?bar=1
I know something similar is possible when configuring a top-level site redirect, using the $S, $Q, %v tokens referred to in this IIS reference page - but this syntax doesn't seem to work when configuring a custom error redirect.
© Server Fault or respective owner