Looking for an URL Forwarding solution

S

Stefan Mueller

I'm looking for a solution to reach e.g.
'http://www.test.com/test/start.html' by entering the URL
'http://www.example.com/index.html'.

My provider offers 'Stealth URL Forwarding'. I just have to define on the
provider's web page that the URL 'http://www.example.com/index.html' has to
be forwarded to 'http://www.test.com/test/start.html'. The called URL in the
browser does not change and is always 'http://www.example.com/index.html'.
That's exactly what I'm looking for.

Unfortunately the provider of my colleague doesn't offer such a feature like
'Stealth URL Forwarding'. So we tried to program it ourself.

File: http://www.example.com/index.html
<html>
<head>
<title>Stealth URL Forwarding to
http://www.test.com/test/start.html</title>
</head>

<frameset border = "0" rows = "100%,*" frameborder = "no" marginleft =
"0" margintop = "0" marginright = "0" marginbottom ="0">
<frame src="http://www.test.com/test/start.html" scrolling = "auto"
frameborder = "no" border = "0" noresize>
<frame topmargin= "0" marginwidth = "0" scrolling = "no" marginheight =
"0" frameborder = "no" border = "0" noresize>
</frameset>
</html>

That works fine with most pages but unfortunately not with all.

I guess my provider is doing the 'Stealth URL Forwarding' somehow without
frames.
Does anyone know how he could do it? Perhaps with PHP?

Stefan
 
S

Stefan Mueller

I'm looking for something like 'Non-framed Web Forwarding'.
But how can I do that?

Stefan
 
D

David Segall

Stefan Mueller said:
Today I'm using

File: http://www.example.com/index.html
<?php
header ("Location: http://www.test.com/test/start.html");
?>
to redirect 'http://www.example.com/index.html' to
'http://www.test.com/test/start.html'.
That works fine but unfortunately the URL changes from
''http://www.example.com/index.html' to
'http://www.test.com/test/start.html'.

Is there really no solution which doesn't change the URL?
Stefan
The "solution" is usually called cloaking and relies on either
scripting or frames to enclose the page at
http://www.test.com/test/start.html in the (almost) non-existent page
at http://www.example.com/index.html. It is regarded as sinful
because, by checking the source of the page request, it allows a web
site devoted to "really boring activated sludge" to trick a search
engine into classifying it as "sex and fun".

My domain name manager allows me to cloak any web forward so I
routinely forward my "real" web site to the free site provided my ISP
when my self-hosted web site is down. An alert visitor would notice
that the forwarded URL does not change when they move around the site
and I have no idea how I could fix that.
 
S

Stefan Mueller

The "solution" is usually called cloaking and relies on either
scripting or frames to enclose the page at
http://www.test.com/test/start.html in the (almost) non-existent page
at http://www.example.com/index.html.

Yes, I used to do it with frames:
File: http://www.example.com/index.html
<html>
<head>
<title>Stealth URL Forwarding to
http://www.test.com/test/start.html</title>
</head>

<frameset border = "0" rows = "100%,*" frameborder = "no" marginleft =
"0" margintop = "0" marginright = "0" marginbottom ="0">
<frame src="http://www.test.com/test/start.html" scrolling = "auto"
frameborder = "no" border = "0" noresize>
<frame topmargin= "0" marginwidth = "0" scrolling = "no" marginheight =
"0" frameborder = "no" border = "0" noresize>
</frameset>
</html>

That works fine with most web pages but unfortunately not with all.

My domain manager (www.mydomain.com) allows me to do 'Stealth URL
Forwarding' and that seems to work with all web pages. However, because the
domain manager of my colleague doesn't offer such a feature, we have to
program it ourself.

But we have no idea how to do it nor how my domain manager
(www.mydomain.com) does it. We just know that it's somehow possible.
Stefan
 
R

Rik

Stefan said:
My domain manager (www.mydomain.com) allows me to do 'Stealth URL
Forwarding' and that seems to work with all web pages. However,
because the domain manager of my colleague doesn't offer such a
feature, we have to program it ourself.

But we have no idea how to do it nor how my domain manager
(www.mydomain.com) does it. We just know that it's somehow possible.

If it's apache, maybe it's a simple mod_rewrite.
create an .htaccess file, containing the appropriate forwarding.

Grtz,
 
D

David Segall

Stefan Mueller said:
Yes, I used to do it with frames:
File: http://www.example.com/index.html
<html>
<head>
<title>Stealth URL Forwarding to
http://www.test.com/test/start.html</title>
</head>

<frameset border = "0" rows = "100%,*" frameborder = "no" marginleft =
"0" margintop = "0" marginright = "0" marginbottom ="0">
<frame src="http://www.test.com/test/start.html" scrolling = "auto"
frameborder = "no" border = "0" noresize>
<frame topmargin= "0" marginwidth = "0" scrolling = "no" marginheight =
"0" frameborder = "no" border = "0" noresize>
</frameset>
</html>
That seems to be what ZoneEdit does. You can check the source at
http://tryit.profectus.com.au.
That works fine with most web pages but unfortunately not with all.
Do you know why it fails with some web pages?
My domain manager (www.mydomain.com) allows me to do 'Stealth URL
Forwarding' and that seems to work with all web pages. However, because the
domain manager of my colleague doesn't offer such a feature, we have to
program it ourself.

But we have no idea how to do it nor how my domain manager
(www.mydomain.com) does it.
Presumably you can look at the source of a redirected page.
We just know that it's somehow possible.
A Google for cloaking mentions javascript but I have not looked for
any code.
 
J

jojo

Rik said:
If it's apache, maybe it's a simple mod_rewrite.
create an .htaccess file, containing the appropriate forwarding.

Grtz,

Yes, can be done with mod_rewrite. But ASFAIK it doesn't work if the
domain (and with it the server which redirect the page) changes. Guess
you have to test it...
 
J

Jonathan N. Little

jojo said:
Rik schrieb:
Yes, can be done with mod_rewrite. But ASFAIK it doesn't work if the
domain (and with it the server which redirect the page) changes. Guess
you have to test it...

If it is a full domain rewrite, then no. It will redirect but in the
address in the address bar of the browser will also change to the
redirected domain.
 
J

jojo

Jonathan said:
If it is a full domain rewrite, then no. It will redirect but in the
address in the address bar of the browser will also change to the
redirected domain.

And if I got Stefan right, then it is one. His example was:
I'm looking for a solution to reach e.g.
'http://www.test.com/test/start.html' by entering the URL
'http://www.example.com/index.html'.

So he'll have to look for a different solution...

BTW: The reason why his workaround with frames doesn't work with all
pages might be that some people prevent their pages to be framed in a
different one with some script, so nobody else can claim their content
as his/hers. (and I'm one of those persons... ;-D)
 
J

Jonathan N. Little

jojo said:
And if I got Stefan right, then it is one. His example was:


So he'll have to look for a different solution...

BTW: The reason why his workaround with frames doesn't work with all
pages might be that some people prevent their pages to be framed in a
different one with some script, so nobody else can claim their content
as his/hers. (and I'm one of those persons... ;-D)

My advice, stop being a cheapskate, there are many very very cheap
hosting packages out there with your own domain name!
 
S

Stefan Mueller

That seems to be what ZoneEdit does. You can check the source at

Yes, that's URL hidding by using frames.

Do you know why it fails with some web pages?

Yes, it fails if the web page does a 'refresh'. The frameset gets destroyed:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
...
<meta http-equiv = "refresh" content = "0; url = index.html">
...
</head>
...
</html>


Stefan
 
J

Jonathan N. Little

Stefan Mueller wrote:

You clipped who quoted this, don't please, it looked like my quote but
it was jojo's remarks
In the frameset are only my pages running and I don't prevent pages to be
framed.
However, the problem is that it fails if the web page does a 'refresh'. The
frameset gets destroyed:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
...
<meta http-equiv = "refresh" content = "0; url = index.html">
^^ ^^^^^^^^^
[1] [2]
[1] I believe "0" is not a valid value on refresh >0

[2] Is index.html your frameset definition? Also think it must be the
full "http://www.example.com/index.html"
...
</head>
...
</html>

Stefan
 
J

jojo

Jonathan said:
In the frameset are only my pages running and I don't prevent pages to
be framed.
However, the problem is that it fails if the web page does a
'refresh'. The frameset gets destroyed:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
...
<meta http-equiv = "refresh" content = "0; url = index.html">
^^ ^^^^^^^^^
[1] [2]
[1] I believe "0" is not a valid value on refresh >0

Do not know what W3C says about it, but it is a common way to redirect
to other sites and it works with almost all browsers.
[2] Is index.html your frameset definition? Also think it must be the
full "http://www.example.com/index.html"
...
</head>
...
</html>

Stefan
 
J

Jonathan N. Little

jojo said:
Jonathan said:
BTW: The reason why his workaround with frames doesn't work with
all pages might be that some people prevent their pages to be
framed in a different one with some script, so nobody else can
claim their content as his/hers. (and I'm one of those persons... ;-D)

In the frameset are only my pages running and I don't prevent pages
to be framed.
However, the problem is that it fails if the web page does a
'refresh'. The frameset gets destroyed:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
...
<meta http-equiv = "refresh" content = "0; url = index.html">
^^ ^^^^^^^^^
[1] [2]
[1] I believe "0" is not a valid value on refresh >0

Do not know what W3C says about it, but it is a common way to redirect
to other sites and it works with almost all browsers.

My point is that you have to have a non-zero value 1, 2, or 3 ...
 
A

Alan J. Flavell

Jonathan said:
<meta http-equiv = "refresh" content = "0; url = index.html">
^^ ^^^^^^^^^
[1] [2]
[1] I believe "0" is not a valid value on refresh >0

But it's the wrong way to do a redirect, no matter what the value for
the delay.
Do not know what W3C says about it,

This will come as no surprise to those who had been following your
low-value contributions.
but it is a common way to redirect to other sites

The "billion flies can't be wrong" principle, hmmm?
and it works with almost all browsers.

For some values of the term "works". But don't you care about other
browsers and client agents?

Clue, for those who care about doing a decent job: HTTP status 30x.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Where to place noframes tag XHTML 5
How to get full URL in Frame 14
Frames not updating 2
Question about frameset 6
InterPage Linking Problem in .mht file 7
change a frames location 1
Log User Click 0
log user click 1

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top