I'm using the following in a .htaccess file,
RewriteRule profile/([A-Za-z0-9-]+)/$ /profile.php?user=$1 [R]
RewriteRule profile/([A-Za-z0-9-]+)$ /profile.php?user=$1 [R]
It's working fine most of the time, but recently I have started to notice that sometime it missed the redirect, I think it's down to punctuation or spaces in the username. Is there a way I can allow for /profile/Anything after this even with -_- punctuation/ to redirect?
I'm completely newb on htacccess files and am learning as I go along.