How can I mask a URL Redirect? (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


fade2black -> How can I mask a URL Redirect? (7/5/2005 6:33:12)

Hi

I have domain that is redirected to a website on another host. It works fine, but I would like to retain the domain name on the browser address bar rather than the actual website domain name.
The redirected domain host does not have the facility to mask as some hosting companies do.
Is there another way to do this that won't upset the SE's?




Donkey -> RE: How can I mask a URL Redirect? (7/5/2005 7:31:30)

If you have an index page at the main domain name, you could try creating a single frame frames page and calling the "real" domain into the single frame. Like so.
<frameset>
<frame src="http://actual-url.anotherhost.com/page.html">
</frameset>

Then your main domain name will be in the frameset page window, not the real address which will be inside the frame.




fade2black -> RE: How can I mask a URL Redirect? (7/5/2005 10:23:25)

Yes, the main/home page is index.html
I'm not clear what to do. Do I just paste into a new file "anyname.html"?

Thanks




cyfocus -> RE: How can I mask a URL Redirect? (7/5/2005 15:29:50)

can you use PHP? i.e. index.php

I have the code php codes that you are looking for.




fade2black -> RE: How can I mask a URL Redirect? (7/5/2005 18:24:19)

I use an index.php for a simple "Tell-a-friend" script.




Donkey -> RE: How can I mask a URL Redirect? (7/6/2005 11:46:20)

quote:

I'm not clear what to do. Do I just paste into a new file "anyname.html"?
Try this, it should work and should also change the title bar to match that of the current page in the frame.

In the index.html file of the domain that is to be redirected insert the following code.
<html>

<head>

<title>Same Title As Your Homepage</title><!-->incase they have javascript turned off<!-->

<script type="text/javascript"><!-->changes title bar to match title on current page in frame<!-->
function changeTitle()
   {
   if (top.frames['main'].document.title)
      {
      top.document.title=top.frames['main'].document.title;
      }
   }
</script>
</head>


<frameset>
<frame name="main" src="http://actual-url.anotherhost.com/page.html"scrolling="auto" target="main" ONLOAD="changeTitle();"><!-->You need the onload handler to make the javascript work<!-->

<noframes>

<body>
Place a suitable message here for people with browsers that can't read frames.
</body>

</noframes>

</frameset>

</html>

Changing the frame src to that of the starting page of the site that is being redirected to.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875