mod rewrite help?

Discuss practical ways rearrange URLs using mod_rewrite.

mod rewrite help?

Postby dmoontown5 » Fri Jul 11, 2008 5:53 am

so far this is what I have, it does not work

http://example.com/member.php?username=aaaa

http://www.example.com/aaaa or http://site.com/aaaa
will be redirected to or equivalent to :
http://example.com/member.php?username=aaaa


rewriteEngine on
Options +FollowSymlinks
rewriteCond %{REQUEST_FILENAME} !-d
rewriteRule ^([^/]+)$ /member.php?username=$1 [L]


Thanks in advance
dmoontown5
 
Posts: 1
Joined: Fri Jul 11, 2008 5:09 am

Postby richardk » Sun Jul 13, 2008 11:17 am

What happens when you go to /aaaa?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

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


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 39 guests

cron