I am using Apache to reverse proxy through to my application server via mod_rewrite but I want to prevent my server from being used to proxy to other addresses.
I thought I'd try to use a few RewriteCond followed by a RewriteRule to check if the address being requested is my domain, and if not return a 403. Can someone tell me if what I have below is correct pls (cos I'm not sure it's working)..
Code:
RewriteCond %{REQUEST_URI} "!http://www.mydomain.com/.*$" [NC]
RewriteRule .* - [F]
So what I'm trying to say is simply if the URI isn't my domain then return a 403 ([F]).
Is this right ?
Tks vm