shawn2page Posted October 19, 2006 Share Posted October 19, 2006 I need to get this code to do more:RewriteRule ^([A-Za-z]+)$ profile.php?ID=$1It now works so if they type www.mysite.com/johndoe it will take them to johndoe's page on our site. But the problem I have is if a member signs up with member name mark2000 the code will not work. How can i set it up to work with numbers or symbols? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 20, 2006 Share Posted October 20, 2006 Add 0-9 after A-Za-z in the rewriteruleSo its like this:[code]RewriteRule ^([A-Za-z0-9]+)$ profile.php?ID=$1[/code] Quote Link to comment Share on other sites More sharing options...
shawn2page Posted October 21, 2006 Author Share Posted October 21, 2006 that works great! but can I get it to work with say www.mysite.com/john_moore or other charaters?if so what would the code be Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 24, 2006 Share Posted October 24, 2006 Add '-_' (without the quotes) after 0-9 in the square bracketsif you get a 500 error after doing that change, then you might need to use '\-_' instead. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.