Categories
How can I disable access to a file via a direct link?
I need get.php to open from a link http://test.ru/a/b But not from a direct link http://test.ru/get.php Is it possible to do this with htaccess?
http://test.ru/a/b
http://test.ru/get.php
Answer the question
In order to leave comments, you need to log in
You can put a redirect.
Routing + mod_rewrite.
RewriteEngine on RewriteCond %{THE_REQUEST} ^\S+\s+/get\.php RewriteRule ^get\.php$ - [F] RewriteRule ^a/b$ /get.php [L]
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question