URGENT - How to deny access to an application location in OHS?
999207Mar 26 2013 — edited Mar 26 2013Dear Gurus,
We want to restrict the access using the External Hostname to the location "/opa46", but allow the access using the Local hostname. How can we achieve this in OHS httpd.conf?
Like:
Deny => http://www.rdconc.com/opa46/test.htm
Allow => http://ocasp/opa46/test.htm
We tried below configuration, but it didn't work.
<Location /opa46>
Order allow,deny
Allow from All
AllowOverride None
# Redirect if not on desired VirtualHost, including upper/lower case attempts:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.rdconc\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^.rdconc\.com [NC]
RewriteRule ^/(.*) http://www.rdconc.com/error.htm [R]
</Location>
Please kindly help.
Many thanks in advance.
Regards,
Tony
Edited by: 996204 on 2013-3-26 上午4:25