Username URLs just like Twitter

In your .htaccess just do this:

  1. RewriteEngine on
  2. RewriteRule ^([A-za-z0-9]+)/?$ user.php?name=$1

This will ignore php files, and any files that are requested deeper into the site like JS or CSS.




Please consider donating Dogecoin if you like my content.

D5igT1DmhYGVMLcXhzkNdf64uEuWWhHTb3



Related Posts Plugin for WordPress, Blogger...

This entry was posted in Coding and tagged , , , , , . Bookmark the permalink.