I can't seem to get my regex working properly.
This works fine:
RewriteRule ^profile/([0-9]+)/?$ profile.php?customURL=$1 [NC,L]
But there's some mistakes. For one, the $1
is alphanumeric, not just numbers (it still works, though). Also, I don't want profile/
in the URL anymore.
I tried this:
RewriteRule ^(/^\w+$/)/?$ profile.php?customURL=$1 [NC,L]
But it didn't work at all. What am I doing wrong?