-2
I currently use the following code to hide the extension on the pages of the site:
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} (.*)/([^/]+)(\?.*)?$
RewriteCond %1/%2.php -f
RewriteCond %{REQUEST_URI} (.*)/([^/]+)(\?.*)?$
RewriteRule .* %1/%2.php [QSA]
This way I can access the site like this: meusite.com.br/page
The problem is that if I put a bar at the end (meusite.com.br/page/) error 404. How can I fix this?