Domain to Page

Using mod_rewrite to handle various content issues

Domain to Page

Postby martinc126 » Tue Sep 30, 2008 11:51 am

Hello,

I'm not sure if this is possible or not,

But i've searched and haven't really found anything

Basically i need it so when people go to

domain.com/username

it redirects them to domain.com/user.php?user=username

Any help or advice

Thanks

Martin
martinc126
 
Posts: 1
Joined: Tue Sep 30, 2008 11:49 am

Postby richardk » Wed Oct 01, 2008 10:37 am

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /user.php?user=$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Content

Who is online

Users browsing this forum: No registered users and 15 guests

cron