Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 will be redirected to

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.

share|improve this question
Easiest fix would be to set up a second site, assign the non-https binding and have that site redirect all requests to the https site – Mathias R. Jessen Jun 23 '12 at 21:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.