Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: URL Masking

  1. #1
    Regular Coder
    Join Date
    Jun 2010
    Posts
    132
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question URL Masking

    I have two websites hosted on different servers and locations... One example1.com and example2.com .
    I want to load the image http://www.example2.com/image.jpg in the page of http://www.example1.com/folder/tony.php , and at the same time I do not want the visitors to know that I am loading this image from example2 and I want to make the URL http://www.exapmle2.com/image.jpg to be viewed http://www.example1.com/image.jpg (like weather sites do when they load images from another sites without letting their users to know the real URL) BUT at the same the image must be loaded from example2.com and not example1.com. (I do not want to use iframes because it's only an image and not a page)

    So please How can I do this?

  • #2
    Regular Coder
    Join Date
    Jun 2010
    Posts
    132
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question

    I think it can be made by mod_rewrite... How?

  • #3
    New Coder
    Join Date
    Jan 2010
    Location
    In a dump
    Posts
    64
    Thanks
    9
    Thanked 2 Times in 2 Posts
    I think it can be done using this:

    Code:
    RewriteRule ^http://www.domain2.com/([^/\.]+)\.jpg %{HTTP_HOST}/$1\.jpg [NC L]
    I have not tested it nor do I know if it will work. If not you might need to change the
    Code:
    %{HTTP_HOST}
    to your domain1 name.


  •  

    Posting Permissions

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