Deek Deek - 1 month ago 10
Apache Configuration Question

Mod rewrite breaks using name

I have this in my .htaccess file

RewriteRule ^member/([^/][0-9]*)$ profile.php?id=$1


and it works as it should what I am trying to do is instead of id I want to use name. so I changed my link accordingly and tried

RewriteRule ^member/([^/][0-9]*)$ profile.php?name=$1


and I get page cannot be found I am retrieving the name and ID together.

username may have characters in it

Answer Source
RewriteRule ^member/([^\/\?\#]+) profile.php?name=$1

This should do the trick.