betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

22 October 2006

One Rule to RewriteRule them all

New version of the witch out

This very moment I've uploaded a new version of the RewriteRule Witch, the RewriteRule generator that helps you to get proper RewriteRules for Zope VirtualHosting through apache. So, what's new? The witch outputs now only one rule. We still cover both cases that the old "two rule" version did, but with an "or" inside the regular expression we need only one rule now...

Umm, you might ask, which two cases? The problem arises mostly in "inside out hosting", i.e.. when you have most of your site as static content in apache, but you host only (for example) the URL dynamic in Zope. That case is easy to cover in a regex, but something overly simplified, like ^/zope(.*) will get you into trouble the next day. Why? On the next day you might decide to publish your own version of the zopelist archives. To do this you decide to use some wonderful PHP application, which you place into See how you get bitten? ^/zope(.*) matches that and your shiny PHP archives will not work, because users keep getting sent to Zope.

The old version of the witch covered the simple case that there was nothing after /zope and the normal case that there was a slash and more of the URL in two rules. The "new" witch gets this grouped into one rule. I've tested both the functioning of the witch and the functionality of the new rules, but if you run into any problems, please let me know!

Posted by betabug at 00:04 | Comments (3) | Trackbacks (0)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< Night Promenade | Main | Places of Enjoyment in Athens >>
Re: One Rule to RewriteRule them all

Why are you doing ($|/.*) instead of simply (.*) ?

Posted by: John Lenton at October 24,2006 22:42
Re: One Rule to RewriteRule them all

Ooops, somehow I didn't read that very explanation. Sorry to waste your time.

Posted by: John Lenton at October 24,2006 22:56
Re: One Rule to RewriteRule them all

John, :-) no problem. Thanks for paying attention then!

Posted by: betabug at October 25,2006 09:40
You can trackback to:
There are no trackbacks.