Simple Mod Rewrite issue that I am having

Using mod_rewrite to handle various content issues

Simple Mod Rewrite issue that I am having

Postby 2levelsabove » Sun Feb 03, 2008 11:41 pm

Hello,

What I am wanting is when someone types "sitename.com/blah", i want it to redirect to sitename.com/profile.php?id=blah


By the way I love this site. Richard is the most helpful forum moderator I have ever seen.


Thanks and God bless.
2levelsabove
 
Posts: 12
Joined: Sun Feb 03, 2008 11:38 pm

Postby richardk » Mon Feb 04, 2008 1:43 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

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

Postby 2levelsabove » Mon Feb 04, 2008 3:49 pm

Thanks so much man.


I appreciate it.


Cheers
2levelsabove
 
Posts: 12
Joined: Sun Feb 03, 2008 11:38 pm


Return to Content

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron