Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread gregory duchesnes
thanks a lot for your help, it really enlightened my mind. For the moment i managed to make it work with 2 maps : RewriteMap vhost txt:/var/www/vhost.map RewriteMap master txt:/var/www/master.map RewriteCond ${master:${lowercase:%{SERVER_NAME}}|default} !=default RewriteRule ^/(.*)$ /var/www/h

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread Joshua Slive
On 12/6/05, gregory duchesnes <[EMAIL PROTECTED]> wrote: > Beware, mail crossing ;) > > I'm beginning to understand your logic, though i don't see why it should > be faster since you do a lookup in vhost.map for each request. > In the case aliases are used only once in a while it could even be slow

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread gregory duchesnes
Beware, mail crossing ;) I'm beginning to understand your logic, though i don't see why it should be faster since you do a lookup in vhost.map for each request. In the case aliases are used only once in a while it could even be slower. But, if i follow your idea, and since mapping are cached,

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread Joshua Slive
On 12/6/05, gregory duchesnes <[EMAIL PROTECTED]> wrote: > RewriteCond ${vhost:%1} ^(/.*)$ That %1 doesn't reference anything, which is why you have an empty key. I think you want to replace it with ${lowercase:%{SERVER_NAME}} Be careful here, however. What happens if the name isn't in the map

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread Joshua Slive
On 12/6/05, gregory duchesnes <[EMAIL PROTECTED]> wrote: > oups, i don't understand you logic either ;) > > ok i'll try to make things clearer > > > What i'm trying to do is this : > > - check if the folder /var/www/hosts/${lowercase:%{SERVER_NAME}}/web exists > - if yes rewrite the request to this

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread gregory duchesnes
me again, sorry, i did one more mistake in the first RewriteCond, it should be like this : # if folder exists as a master domain RewriteCond /var/www/hosts/${lowercase:%{SERVER_NAME}}/web -d # do the magic RewriteRule ^/(.*)$ /var/www/hosts/${lowercase:%{SERVER_NAME}}/web/$1 [L] # else redirect

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread gregory duchesnes
oups, i don't understand you logic either ;) ok i'll try to make things clearer What i'm trying to do is this : - check if the folder /var/www/hosts/${lowercase:%{SERVER_NAME}}/web exists - if yes rewrite the request to this folder - else if SERVER_NAME is found in the vhost.map (as first entr

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread Joshua Slive
On 12/6/05, gregory duchesnes <[EMAIL PROTECTED]> wrote: > Anyone's got an idea, i'm still stuck on this one... > > # define the map file > > RewriteMap vhost txt:/www/conf/vhost.map > > > > # deal with aliases as above > > RewriteCond %{REQUEST_URI} ^/icons/ > > RewriteCond %{REQUEST_URI} ^/cgi-b

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread gregory duchesnes
I turn RewriteLog 9 but it is such a nightmare, i don't see what's wrong... by the way i cleaned the garbage characters when i did my reply so there's nothing to decipher, might help, no? Greg Joshua Slive a écrit : On 12/6/05, gregory duchesnes <[EMAIL PROTECTED]> wrote: Anyone's got

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread Joshua Slive
On 12/6/05, gregory duchesnes <[EMAIL PROTECTED]> wrote: > Anyone's got an idea, i'm still stuck on this one... Start by using the RewriteLog to try to figure it out yourself. If you still can't get it, post again with a clean example. It is just too difficult to decipher your configuration with

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-06 Thread gregory duchesnes
Anyone's got an idea, i'm still stuck on this one... gregory duchesnes a écrit : Hi all, i'm trying to set up some kind of ISP style virtual hosting, the problem is some domains have a lot of aliases (which i need to redirect to the master domain with à code 301). I thought of using mod_vh

Re: [EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-05 Thread gregory duchesnes
Please ignore the pipes "|" that were automatically inserted in my code, i don't know where it comes from... gregory duchesnes a écrit : Hi all, i'm trying to set up some kind of ISP style virtual hosting, the problem is some domains have a lot of aliases (which i need to redirect to the ma

[EMAIL PROTECTED] mod_rewrite mass virtual hosting and aliases

2005-12-05 Thread gregory duchesnes
Hi all, i'm trying to set up some kind of ISP style virtual hosting, the problem is some domains have a lot of aliases (which i need to redirect to the master domain with à code 301). I thought of using mod_vhost_alias this way: - create a folder for the master domain - create a symlink to th