[Project_owners] Replacement for mozdev.org templates

Douglas E. Warner silfreed at silfreed.net
Tue Jul 1 07:30:36 PDT 2008

On Monday 30 June 2008 17:32:07 Michael Vincent van Rantwijk, MultiZilla 
> > Oh dear. Apache's dreadful mod_rewrite I just got to master this one day
> > soon.
> Note: mod_rewrite works.  I've added a few test rules to rewrite
> sites/pages but I am still trying to solve the puzzle for the above
> rewrite.

Our mod_rewrite rules are pretty complicated right now; here are some snippets 
that deal with the templating system that might help with things.


RewriteRule .* - [E=MZ_HTTP_HOST:%{HTTP_HOST}]
RewriteCond %{ENV:MZ_HTTP_HOST} ^([^.]+)\.(mozdev|vebzom)\.org(:[0-9]+)?\.?$ 
RewriteRule ^ - [E=VHOST:${lowercase:%1},S=1]
RewriteRule ^ - [E=VHOST:www]

RewriteRule ^/$ /php/index.php?project=%{ENV:VHOST}&page=index.html [L]
RewriteRule ^/(.+\.html?)$ /php/index.php?project=%{ENV:VHOST}&page=$1 [L]
RewriteRule ^(.+/)$ /php/index.php?project=%{ENV:VHOST}&page=$1index.html [L]
RewriteRule ^(.*)$ /%{ENV:VHOST}/www$1 [L,PT]

Douglas E. Warner    <silfreed at silfreed.net>    Site Developer
Mozdev.org           http://www.mozdev.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://www.mozdev.org/pipermail/project_owners/attachments/20080701/7598e4ad/attachment.bin>

More information about the Project_owners mailing list