I have virtual host configuration as below.

<VirtualHost *:80>
  ServerName my.example.com
  RewiteEngine On
  RewriteRule ^/env/test?www_cert http://mytest.example.com/cert.html [R=301,L,NE]
  RewriteRule ^/env/dev?www_cert http://mydev.example.com/cert.html [R=301,L,NE]
  RewriteRule ^/(.*)$ http://my-app.example.com/$1 [NC,P,L]
  ProxyPassReverse / http://my-app.example.com/


The issue is when I run http://my.example.com/env/test?www_cert the rewrite rule is not working when I use http://my.example.com/env/testwww_cert its getting redirected to http://my-app.example.com/env/testwww_cert.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.