Domain Masking with HTML

11.5k Views Asked by At

How do I mask the address of another site using HTML?

For example, I'd like:

http://www.example.com/source.html

To point to another page:

http://www.example.com/dest.html

Note that the destination page could be on another domain.

5

There are 5 best solutions below

1
ONODEVO On BEST ANSWER

A frameset seems to be what I was looking for:

<frameset rows="100%">
    <frame src="http://www.example.com/dest.html"/>
</frameset>
0
DOK On

There's plenty of people who would assert that your objective is to mislead the user, that it is unethical. However, if you really must do this, can you leave the link alone and redirect when the user arrives at the linked page?

0
netadictos On

If you are using Apache, you can use REWRITE mod, but it must be in the same domain. In .NET there rewrite libraries done. People will see in the address bar: source.html but the code will be that of dest.html.

Any other thing is simple redirects.

0
Dar On

You could do this with javascript. Just stick this on your page and it will redirect:

<script>location.href = 'http://www.example.com/dest.htm'</script>
0
AmbroseChapel On

One way to do this is with an invisible frame set to 100% of the browser height. But what happens when someone clicks on a link in that framed page? I agree with DOK, people will be suspicious of your motives for doing this.