While browsing directories in Apache I would like to have the files that have no extension to be treated by the server as php when clicking on them (those files containing php code).
You can use the H flag of apach mode rewrite to force all files without an extension to be parsed by The php handler :
try the following in htaccess :
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\. - [H=application/x-httpd-php]
on some servers, you have to change httpd-php by httpd-php5 :
RewriteRule !\. - [H=application/x-httpd-php5]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With