1
I am facing an error with . htaccess file and I am unable to resolve, is the following:
I have the following rule:
RewriteRule ^([^\.]+)$ $1.php [NC,L]
This rule aims to ignore the . php extension of all files accessed in my directory. However, when I use this rule, the others stop working, such as these:
RewriteRule ^([^/]+).$ cidade.php?slug_cidade=$1 [NC,L]
RewriteRule ^restrito/usuarios/pagina/([^/.]+)$ restrito/usuarios.php?pagina=$1 [L,QSA]
RewriteRule ^restrito/edit/usuario/([^/.]+)$ restrito/edit/usuario.php?id=$1 [NC,L]
When I use the rule to ignore extensions, all files: cidade.php
, restrito/usuarios.php
, and restrito/edit/usuario.php
when accessed show Error 404
, when I remove the rule to ignore the extensions, they go to work normally, the way I would like.
Some way to solve this problem?
Some personal solution?
– Wendel Souto