Take the 2-minute tour ×

Anybody know an online tool to generate Apache mod_rewrite rules to point people with simple .htaccess questions to?

I'm thinking of simple standard scenarios:

  • Simple redirects (url1=>url2)

  • Removing / adding www.

  • /a/b/c/d to index.php?value1=a&value2=b...

and so on and so on....

I'm asking because most mod_rewrite questions turning up on SO could be answered with a link to that, and help people help themselves (well, help as far as "help" goes with a generator tool that can be used without actually having to learn how things work.)

share|improve this question
On a semi-related note, I'm working on something in response to this question...but shh, it's a secret (actually I just got lazy/busy and need to get back to working on it). Also, you reminded me that I should take a stab at writing the mod_rewrite tag wiki... –  Tim Stone Sep 12 '10 at 19:24
@Tim nice, feel free to add if something comes out of it! That sounds interesting. –  Pekka 웃 Sep 12 '10 at 19:26

2 Answers 2

up vote 8 down vote accepted

Even more such questions could be solved with a link to the manual.

If we provide only a link to a generator, the answer has no educational value, and will result only in more trivial questions asked. I'd recommend reading answers to this question form meta, which contains some relevant discussion.

That said, a quick google search has returned some useful results:

share|improve this answer
+1 both nice! Re the 2nd paragraph: I doubt the influx of trivial questions can be stopped either way. (I have asked a related question on Meta) I'm rather looking for a lazy way to give a useful answer. The manual is too complex for people who know nothing about Apache; your tutorial link looks interesting, though. –  Pekka 웃 Sep 12 '10 at 13:21
@Pekka: There will always be new users who will ask trivial questions, but I think that it's important to teach them to try and learn themselves, so they won't do it again (and become better programmers along the way). –  Mewp Sep 12 '10 at 13:41

A cheap google search has two that exist.

I've tried three so far. I like this one the most so far:

Also, if you need a tool to test these results:

share|improve this answer

Your Answer


