URL Forwarding

liunx

Guest
I wonder what script/html code should I write so when user visits my domain <!-- w --><a class="postlink" href="http://www.page.com">www.page.com</a><!-- w --> it opens some other URL in this window, but without any messages like, "please wait while you are beeing redirected" or "click here..."..<br />
Also, the domain name <!-- w --><a class="postlink" href="http://www.page.com">www.page.com</a><!-- w --> must stay on top. and if anyone tries view-source:http://www.page.com he should see the source of forwarded webpage, and not the real one...<br />
My guess it should be done with frames or somehow..<!--content-->Yes, you could use frames, but those are quite annoying. Instead, try PHP includes, or SSI includes.<!--content-->Can you provide me with some code? Hosting server would probably be IIS, maybe with PHP support...<!--content-->A PHP include looks like this:<br />
<br />
<br />
<?php include('some_file.html'); ?><br />
<br />
<br />
To use PHP includes, the page that has the include on it must be saved with the ".php" extension. SSI, or Server Side Includes, are only available on some servers, so check if they are available on yours. Most servers require SSI pages to have the ".shtml" extension. Here's how to inlude a file with SSI:<br />
<br />
<br />
<!--#include file="some_file.html" --><!--content-->Yes, thanks.. PHP exampole works just fine... Although I would like to paste some HTML example too, if someone wish to use it...<br />
<br />
<HTML><br />
<HEAD><br />
<meta name="DESCRIPTION" content=""><br />
<TITLE></TITLE><br />
</HEAD><br />
<!-- Redirection Services RedirectorC-SEF 404-T --><br />
<FRAMESET ROWS="100%, *" frameborder="no" framespacing=0 border=0><br />
<FRAME SRC=http://www.webdeveloper.com/forum/archive/index.php/"http://www.site.com/index.htm" NAME="mainwindow" frameborder="no" framespacing="0" marginheight="0" marginwidth="0"></FRAME><br />
</FRAMESET><br />
<NOFRAMES><br />
<CENTER><br />
<H2><br />
Your browser does not support frames. We recommend upgrading your browser.<br />
</H2><br />
<br><br><br />
Click <a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.site.com/index.htm">here</a> to enter the site.<br />
</CENTER><br />
</NOFRAMES><br />
</HTML><!--content-->
 
Back
Top