I’m actually working on a job for school and I try to create a URL rewriting with .htaccess.
So this is my code in my .htaccess
Options +FollowSymlinks
RewriteEngine on
RewriteRule profile/([0-9]+) profile/index.php?id=$1 [L]
RewriteRule profile/([a-zA-Z]+) profile/index.php?username=$1 [L]
I try to create a rewriting with the ID or the Username, if I delete the last line, my code work for digit but if with the username that never works. I’m not quite good with url rewriting, learning for the moment. But is it possible to do this or not??
And if it’s possible how can I do this?
You forgot the $.