var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Geoip url rewrite to cloak a URL
I just purchased geoip and I want to use it to cloak my file mirrors:
I think it can be done using htaccess and url rewriting but I'm not sure how.
if ($country == "UK")
http://www.server.com/images/*.jpg => retrieve .jpg from current location on http://www.server.com/images/*.jpg
If ($country != "UK"}
http://www.server.com/images/*.jpg => http://www.server2.com/images/*.jpg
However, I don't want people to ever see http://www.server2.com/images/*.jpg being retrieved from www.server2.com.
So I want to cloak/hide the domain name in case 2.
I found something like this on google:
RewriteRule ^(.+)\.htm$ http://corz.org/$1.php [r=301,nc]
Can this be done across different domains and only the original domain will be seen in the status bar / url?
The above rule will rewrite the url in the browser. If you need to retain the url in the browser, add the following inside the index.php file inside the image folder of server1 document root.
<?php header("Location: http://www.server2.com/images/"); ?>