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 have an account where hundreds of inbound links to their calender are showing up as 404 (they moved their site to a new platform). I would like to make a wildcard redirection of all URLs with a query to their old event calender to land on a new static page, and do the same for their webstore queries. I've tried several variations, but can't seem to get it to work.

CASE 1: I need to redirect URLs like these (note the difference between "showDay" and "showWeek"):

apps/calendar/showWeek?calID=5107976&year=2011&month=7&day=10 apps/calendar/showDay?calID=5107976&year=2011&month=9&day=10


CASE 2: And also URLs like these:



I can't seem to get the syntax right to take all of the URLS and redirect them. I'm looking for the equivalent of a wildcard like "apps/calendar/*" would give you at a command line.

Any help is appreciated!

share|improve this question

Thank you very much! You definitely helped me!

I did have to add a question mark at the end of the domain I'm redirecting to in order to strip out the query:

    RedirectMatch Permanent apps/calendar/?.* http://domain/com/events/?
    RedirectMatch Permanent apps/webstore/?.*
share|improve this answer

For the calendar URLs:

RedirectMatch Permanent apps/calendar/?.* http://domain/com/events/

And the webstore:

RedirectMatch Permanent apps/webstore/?.*

You don't need rewrites.

share|improve this answer

Your Answer


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.