i have almost 20 pages on server, but i want only a file named abc.php, which users can watch. i want if user forcefully open the other files like //example.com/some.php .htacce
This .htaccess
-file will only allow users to open index.php
. Attempts to access any other files will result in a 403-error.
Order deny,allow
Deny from all
Allow from all
If you also want to use authentication for some of the files, you may simply add the content from your current file at the end of my example.