/q/me => spammers.php?what=infoip&ip=REMOTE_ADDR

Discuss practical ways rearrange URLs using mod_rewrite.

/q/me => spammers.php?what=infoip&ip=REMOTE_ADDR

Postby Winbots.org » Sun Mar 13, 2005 12:01 pm

Like if someone from 1.2.3.4 requests it I want it to change it to spammers.php?what=infoip&ip=1.2.3.4
here is what i got so far...
Code: Select all
RewriteRule ^q/me$ spammers.php?what=infoip&ip=%(REMOTE_ADDR) [L]

but it takes %(REMOTE_ADDR) as a litteral "%(REMOTE_ADDR)" and not the ip of the client...
Winbots.org
 

Postby Caterham » Sun Mar 13, 2005 1:27 pm

yes, you're using (), but you've to use {}

Code: Select all
RewriteRule ^q/me$ spammers.php?what=infoip&ip=%{REMOTE_ADDR} [L]
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

thanks

Postby Winbots.org » Sun Mar 13, 2005 3:08 pm

Thanks ;)
Winbots.org
 


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 25 guests

cron