On Sep 22, 2011, at 2:23 AM, Michele Mase' 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?

ProxyPassMatch /app(\d+) http://192.168.1.1/app$1
RewriteRule ^/app(\d+)$ /app$1/ [R]
ProxyPassReverse / http://192.168.1.1/

That'll do all 180 rules you have above.

--
Rich Bowen
rbo...@rcbowen.com
rbo...@apache.org







---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to