I have a profile system in PHP. If you want to access their profile, you have to goto /profile.php?user=username I want to be able to rewrite this /@username.
Currently, my .htaccess code is this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ - [F]
RewriteRule ^@(.*)$ profile.php?user=$1 [L,QSA]
FIXED: I had to change AllowOverride to All in my apache configuration.
<Directory /path/to/directory>
AllowOverride All
</Directory>
and changed my htaccess file to: (thanks to the person who answered this question)
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^@(.*)/?$ profile.php?user=$1 [L]