Answer the question
In order to leave comments, you need to log in
Hiding the extension of PHP files?
I read it in the PHP Hiding
documentation . An idea arose, what if in .htaccess to prohibit the execution of scripts using standard extensions and make php run through * .habr, for example like this:
AddType application/x-httpd-php .habr
<Files ~ "\.(php[2-5]?|cgi|pl|fcgi|fpl|phtml|shtml|asp|jsp)$">
Deny from all
</Files>
Answer the question
In order to leave comments, you need to log in
This moronic section should have been removed from the documentation long ago.
Because no security from this is not increased.
Not to mention that for many, many years, the de facto standard has been CNC addressing, in which no .php files are visible from the outside anyway.
We organize one entry point (index.php for example) and allow only this file to be executed. We will organize routing with some ready-made components, since now there are no problems with them. And there is no need to invent any perversions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question