Twitter Like URL but with a @'s?
I am making a social networking website, and I can't get this done: If the
url is http://url.com/@username, I want it to show the
http://url.com/user?u=username page, but show http://url.com/@username
URL.
However, if there is no @ in the beginning, treat it like a regular URL.
This is my .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^/(\d+)*$ ./user.php?u=$1
No comments:
Post a Comment