redirecting depending on visitor IP

Discuss practical ways rearrange URLs using mod_rewrite.

Postby Guest » Sat Jul 27, 2002 5:25 pm

Is there a way to redirect visitors to different addresses depending on their IP.
Been trying with mod_rewrite but can't get it to work.
Guest
 

Postby Brett » Mon Aug 05, 2002 12:18 pm

Yes you can. For example, the following will display 12.236.html to any visitor whose IP starts with 12.236:
Code: Select all
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^12\.236
RewriteRule ^(.*) 12.236.html
Brett
 
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm
Location: yohost.com


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 35 guests

cron