User friendly URL with folder

Asked

Viewed 55 times

0

1 answer

0

For the user only home

RewriteEngine On

# http://localhost/newera/user/home
# -->  http://localhost/nomeprojeto/usercenter/index.php?user=home
RewriteRule ^newera/user/home/?$ nomeprojeto/usercenter/index.php?user=home [NC,L,QSA]


For any text:

RewriteEngine On

# http://localhost/newera/user/qualquer-texto
# -->  http://localhost/nomeprojeto/usercenter/index.php?user=qualquer-texto
RewriteRule ^newera/user/([^/]+)/?$ nomeprojeto/usercenter/index.php?user=$1 [NC,L,QSA]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.