I am trying to redirect all vhosts to a certain url based on the REQUEST_URI.
For example if somebody makes a request to www.something.com/condition on my server to be redirected to google.com
I included a file in my httpd-vhsots.config and inside I have:
RewriteEngine on
RewriteCond "%{REQUEST_URI}" "^/condition"
RewriteRule "^/(.*)$" "https://www.google.com/" [R=permanent,L]
<VirtualHost *>
RewriteEngine on
RewriteOptions inherit
</VirtualHost>
So far I have no luck so I decided to ask for some help.
Where is the best place to include this file - on the top or on the bottom of the httpd-vhosts.config?