httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Turrisi <...@turrisi.co.uk>
Subject Re: [users@httpd] Mass configured virtual hosts and dynamic alias's
Date Fri, 27 Jan 2006 09:00:04 GMT


Joshua Slive wrote:
> On 1/26/06, Tom Turrisi <tom@turrisi.co.uk> wrote:
> 
>>Thanks for you reply. It's put me in the right direction but i'm still
>>having a problem working out the correct regex for what i need to do.
>>
>>I don't know how to get the first and second characters of the domain
>>into the places where i have put <1> and <2> in the following config.
>>I also don't know how to strip www from the server_name if it's present.
>>I hope someone can be of help with this!
> 
> 
>>     RewriteEngine On
>>     RewriteMap  lowercase  int:tolower
>>     RewriteRule  ^/dshop/(.*)$
>>/domains/<1>/<2>/${lowercase:%{SERVER_NAME}}/shop/$1
> 
> 
> Something like
> 
> RewriteCond ${lowercase:%{SERVER_NAME}} ^(www\.)?(.)(.)(.*)
> RewriteRule ^/dshop/(.*) /domains/%2/%3/%2%3%4/shop/$1
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

That has worked perfectly. Thank you so much!

Tom


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message