Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This feels like it should be really really simple, but I can't figure it out. I must be missing something very obvious.

I want to redirect from the homepage of my site www.example.com to www.example.com/coming-soon

but I can't figure out what pattern to use to match this. I've tried:

  • keeping the pattern blank
  • /
  • ~

But none of these seem to match. I'm also not sure whether to match using reg ex, wildcards or exact match.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Use regex and for the URL field (top one) use '^($|default.aspx$)' (without the quotes). That means exactly nothing or exactly default.aspx. Obviously you can replace default.aspx with your own default doc. Whether or not someone enters a trailing slash won't matter. The URL field strips that.

You can use {HTTP_HOST} in the condition to filter by just your domain name.

And, if you use a rewrite rather than a redirect then the URL will remain at www.example.com and look a bit better to the user ... unless you want them to see the coming-soon in the URL.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.