httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Vlasov <ren...@renton.name>
Subject [users@httpd] RewriteCond: backreferences in TestString
Date Fri, 19 Aug 2016 14:40:41 GMT
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message