I’d like:
http://www.example.com/usernameto redirect to:
http://www.example.com/user.php?id=usernameTrying to use this mod_rewrite rule I found: RewriteRule ^user/(\w+)/?$ user.php?id=$1
However, I have something wrong. It doesn’t work (shocker!). I’ve tried a lot of different things, but no luck. Any advice linode ninjas? Thank you!
<VirtualHost xxx.xxx.xxx.xxx.:443>
ServerAdmin webmaster@localhost
ServerName example.com
ServerAlias
http://www.example.com DocumentRoot /home/public
<Directory /home/public>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
RewriteEngine On
RewriteRule ^user/(\w+)/?$ user.php?id=$1
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
</VirtualHost>