RewriteCond: backreferences in TestString

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

 



Hi,

I oo dynamically switch PHP versions but it turns out too many rules.
Can it somehow easier?

## PHP 5.2
RewriteCond /patch/ver52 -f
RewriteRule ^([^?]*)\.php(.*)$ http://127.0.0.1:10052%{REQUEST_URI} [NC,L,P]
...
## PHP 5.6
RewriteCond /patch/ver56 -f
RewriteRule ^([^?]*)\.php(.*)$ http://127.0.0.1:10056%{REQUEST_URI} [NC,L,P]

## PHP 7.0
RewriteCond /patch/ver70 -f
RewriteRule ^([^?]*)\.php(.*)$ http://127.0.0.1:10070%{REQUEST_URI} [NC,L,P]

For example, to PHP version of the flag file are substituted in the port
number?

something like this:
RewriteCond /patch/ver(70) -f
RewriteRule ^([^?]*)\.php(.*)$ http://127.0.0.1:100%1%{REQUEST_URI} [NC,L,P]

thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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