2
Good
I have the paths of the friendly urls in the htacess file I am viewing the users by the url so by the profile file
http://exmeplo.pt/users/carlos
But I now wanted to edit the profile of this user who is another editar_profile.php file but wanted the url to look like this:
http://exmeplo.pt/users/carlos/edit
But I can’t get it to work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rotas para o menu principal
RewriteRule ^(comer|dormir|comprar|servicos|lazer|o-que-visitar|login|recuperar- password|registo|contactos|invite|erro|actualizar-password)$ index.php?controller=$1
# Rotas para os estabelecimentos
RewriteRule ^estabelecimentos/([a-zA-Z-0-9-_]+)$ index.php? controller=estabelecimentos&option=tipo&tipo=$1 [L]
RewriteRule ^([a-zA-Z-0-9-_]+)$ index.php?controller=ver_estabelecimento&option=local&local=$1
# Rotas dos Users
RewriteRule ^users/([a-zA-Z-0-9-_]+)$ index.php?controller=perfil&option=user_id&user_id=$1
#Erro 404
ErrorDocument 404 /erro
Always put your
.htaccess
in question. Without it it may be that someone proposes an answer that is not compatible with their current rules.– André Ribeiro
You’re right forgetting my part I already put
– César Sousa