w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
.htaccess - Deny access to folder but allow access to file via index.php
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://www.hello.com/index.php
RewriteRule .*subfolder/somefile.php - [NC,F]

The second line checks whether the visitor is not coming from a certain url. The 3rd line blocks them from accessing somefile.php

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.