Re: Smarter rewrite rule

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

 



RewriteRule ^/(.*)$ /$1/ [R]

in general or if you need only for appN where N is one or more digits then

RiwriteRule ^/(app\d+)$ /$1/ [R]

Not tested though Im writing this from my phone.

On Sep 22, 2011 4:23 PM, "Michele Mase&apos;" <michele.mase@xxxxxxxxx> wrote:
> Hi folks, I'using a lazy rule on my site:
> ...
> ProxyPass /app1/ http://192.168.1.1/app1/
> ProxyPassReverse /app1/ http://192.168.1.1/app1/
> RewriteRule ^/app1$ /app1/ [R]
> ProxyPass /app2/ http://192.168.1.1/app2/
> ProxyPassReverse /app2/ http://192.168.1.1/app2/
> RewriteRule ^/app2$ /app2/ [R]
> ....
> ProxyPass /appn/ http://192.168.1.1/appn/
> ProxyPassReverse /appn/ http://192.168.1.1/appn/
> RewriteRule ^/appn$ /appn/ [R]
> ...
> The list is from app1 till app60
>
> I have almost 60 rules and the conf file becomes difficult to read and edit
> (error prone)
> How could I use a smarter one?
> Regards
> MM

[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