Currently on my website, my profile urls look like this: ../user/?id=1
I would rather them look like this: ../user/1
How would I go about this? I'm running this with Apache and PHP if that is important to the question.
Currently on my website, my profile urls look like this: ../user/?id=1
I would rather them look like this: ../user/1
How would I go about this? I'm running this with Apache and PHP if that is important to the question.
You can do this with .htaccess Example:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^user/([a-zA-Z0-9_-]+)$ user.php?id=$1 [L,QSA]
</IfModule>
This htaccess rule will redirect input like www.site.com/user/123 to user.php?id=123