guys I have the following code in my .htaccess file and I want to know who can help me order my code:
Options -Indexes
RewriteEngine on
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI}
ErrorDocument 404 /error404.html
ErrorDocument 403 /error403.html
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif A432000
ExpiresByType image/svg A432000
ExpiresByType image/jpg A432000
ExpiresByType image/jpeg A432000
ExpiresByType image/png A432000
ExpiresByType image/ico A432000
ExpiresByType image/bmp A432000
ExpiresByType text/css A432000
ExpiresByType text/javascript A432000
ExpiresByType application/javascript A432000
ExpiresByType application/x-javascript A432000
</ifmodule>
I am trying to hide the extensions of my files by implementing the following code:
#RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
But I can not make it work, it gives me 500 error and other times it does not hide the extension of the file showing in the browser the names of the files example login.php usuario.php admin.php.