This is a discussion on Need help with MOD Rewrite & IP Redirection within the Linux Web Servers forums, part of the Web Server and Related Forums category; I have a closed site where I want to redirect users based on their IP addresses to different sub-directories. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have a closed site where I want to redirect users based on their IP
addresses to different sub-directories. What is the proper syntax using mod-rewrite to accomplish this? Here are two different IP example flavors of what I am looking for -- any other advice/help on how to construct these for different IP address configurations would be most appreciated. Incoming 67.160.*.* (All IP's within this range) redirected to www.website.com/something/level1/ Incoming Fixed IP 64.68.82.142 redirected to www.website.com/something/level2/ |
|
|||
|
mattsimc@yahoo.com (Matthew) wrote:
> I have a closed site where I want to redirect users based on their IP > addresses to different sub-directories. What is the proper syntax > using mod-rewrite to accomplish this? > > Here are two different IP example flavors of what I am looking for -- > any other advice/help on how to construct these for different IP > address configurations would be most appreciated. > > Incoming 67.160.*.* (All IP's within this range) redirected to > www.website.com/something/level1/ RewriteCond %{REMOTE_ADDR} ^67\.160\..+$ RewriteRule /something/(.*) /something/level1/$1 [L] > Incoming Fixed IP 64.68.82.142 redirected to > www.website.com/something/level2/ RewriteCond %{REMOTE_ADDR} ^64\.68\.82\.142$ RewriteRule /something/(.*) /something/level2/$1 [L] -- Johannes Lichtenberger · http://www.nabooisland.com |