Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

The website I work on had these two pages in the past:


(These are not actual domain names, just examples.)

The directory structure had been recently reorganized, and the URLs for the same pages changed to:


I want a mod_rewrite rule (or a less resource-consuming alternative method, such as Redirect command or something similar) to benefit those enthusiasts who had both pages bookmarked with old URLs. I need this to work for both http// and http// versions of the URLs.

My solution would be this:

Redirect /stripes/zebras
Redirect /news/zebras

– but I'm not sure if I'm correct. Being awful at regex, and having only superficial understanding of .htaccess, I'd sure be grateful for some guidance.

share|improve this question

closed as not constructive by Michael Hampton, freiheit, mdpc, Khaled, MDMarra Feb 11 '13 at 14:20

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

What's wrong with it? – Michael Hampton Feb 10 '13 at 19:39
I'm simply looking for the fastest and least resource-consuming solution. Do you think this one would be better than mod_rewrite? – Dimitri Vorontzov Feb 10 '13 at 19:41
Did you test it? Does it work? If so don't worry too much about resource consumption. This will be nothing compared to the load placed by normal requests. – dunxd Feb 11 '13 at 10:25
up vote 1 down vote accepted

You'd probably gain more in terms of flexibility by using mod_rewrite.

The other alternative is a "redirection app". This one was the product of a fairly large-scale redesign of UK web-facing government services, and apparently Rewrite rules would've gotten too unwieldy.

share|improve this answer

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