Page 1 of 1

Mod_rewrite question

Posted: Mon Aug 22, 2005 2:02 pm
by driesdk
Hi guys
I have this problem, I'm using a script where for example the profile page of a user is: http://www.abc.com/?L=users.profile&id=222
I want to make a Mod_rewrite rule to make it: http://www.abc.com/222

Now, I have made something and it's this:

Code: Select all

RewriteEngine On

RewriteOptions MaxRedirects=10

RewriteCond %{REQUEST_FILENAME} /data/ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]

RewriteRule ^([a-z0-9]+)/? ?L=users.profile&id=$1 [L]
RewriteRule ^([a-z0-9]+)/? ?L=users.profile&username=$1 [L]
But... everyhting works but from then on I can't access the other links on the profile page, because, then it's something like: http://www.abc.com/222?L=users.myaccount instead of http://www.abc.com/?L=users.myaccount

So, I guess the problem is the script isn't using strictpaths (complete url's)
Is there some solution to this?
Greetz,

Posted: Tue Aug 23, 2005 6:16 am
by driesdk
nobody an idea if this is possible?