Home How to deny access to a file name in .htaccess
Reply: 0

How to deny access to a file name in .htaccess

user496 Published in July 18, 2018, 10:28 pm

Please Help! I am trying to forbid visitors to access the following file name ?file=: Only work with my domain like we do Hotlink protection


Try this

RewriteCond %{HTTP_REFERER} !^domain.com$ [NC]

RewriteEngine On RewriteRule (^|/)file(/|$) - [F,NC]

but what I have above does not work: I can still access the file from the browser remotely.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.317691 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO