www.webdeveloper.com
Results 1 to 5 of 5

Thread: Redirecting to different server while keeping URL

  1. #1
    Join Date
    Jul 2011
    Posts
    18

    Redirecting to different server while keeping URL

    I have a page within my site which will redirect to a page hosted by an outside source but I would like to keep my domain name in the address bar.

    Is there a way to do so safely?

  2. #2
    Join Date
    Dec 2005
    Posts
    2,984
    Only possible with (i)frames. If you go the (i)frame route, note that the address bar will never update when the page does.

    You can imagine the security risk to the user if you were allowed to send them to one site and have the address bar say that they were on a different site.
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  3. #3
    Join Date
    Jul 2011
    Posts
    18
    Quote Originally Posted by aj_nsc View Post
    Only possible with (i)frames. If you go the (i)frame route, note that the address bar will never update when the page does.

    You can imagine the security risk to the user if you were allowed to send them to one site and have the address bar say that they were on a different site.

    yea, it makes sense..just had a client ask as they're punching out to some non-profit donation system and want the illusion that it's on their site.

    so I'd just make domain.com/donate and put just an iframe with the actual URL within? are there normally margin or alignment/centering issues? I need this to appear exactly as other site pages do visually.

  4. #4
    Join Date
    Dec 2005
    Posts
    2,984
    Unless it's a very short (in height) site, you can't get it to appear exactly because the user will see the scrollbar in a different position than it normally is. It will appear more inside the browser window than where it usually is.

    However, I would generally stay away from all this. These are very black-hat style techniques. Just pop the site up in a new window and don't irritate your users
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  5. #5
    Join Date
    Jan 2009
    Location
    Insanity
    Posts
    1,131
    It is also a case of deception which is a serious offense.
    We all have baggage to carry in life, unfortunately for me I always get the trolley with the wonky wheel...
    Code:
    Youre = {
          STILL_not_getting_it:function(){
               alert("YOU, the original poster / thread starter NEED to POST the code and NOT a LINK.");
          },
          MissingThePoint:function(msg){
                alert("You're missing the point. " + msg);
          }
    }
    Youre.STILL_not_getting_it();

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles