Results 1 to 3 of 3
  1. #1

    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.

    Thanks

  2. #2
    I found something like this on google:

    Code:
    Options +FollowSymlinks
    RewriteEngine on
    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?

  3. #3
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    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 Code:
    <?php header("Location: http://www.server2.com/images/"); ?>
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •