Re: [users@httpd] Mass configured virtual hosts and dynamic alias's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/26/06, Tom Turrisi <tom@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux