Rewrite . htaccess URL for profiled site

Asked

Viewed 29 times

0

All right?

I’m making a PHP platform with a public profile. It would need my single.php file to be rewritten in the URL whenever someone accesses for example: meusite.com/Fillipe or meusite.com/luis.

I need to get all the information after the bar and rewrite the page every time someone accesses a different public profile.

Anyone knows?

  • Probably someone else does, but it would be nice for you to share with us what you’ve already tried to do so that we can help you :)

1 answer

0

So you need to add the excerpt below in your .htaccess, remember to replace the file name and parameter name. Make a backup of the file .htaccess original, in case of error you have to reverse.

Search on google "php htaccess friendly URL" will have plenty of videos and tutorials on the internet.

RewriteRule ^([a-z]+)\/?$ perfi.php?idPerfil=$1 [NC,L]

Browser other questions tagged

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