user3487121
user3487121

Reputation: 53

Redirect Stealthly

    <meta http-equiv="refresh" content="3; ,URL=http://www.redirectsiteurl.com">

Trying to redirect from my website but would like to know if it is possible to show the redirect site url instead of the url redirected to. In some web host, they have the option for stealth domain forwarding but unfortunately mine doesn't have this option so I am trying to work around it with META REFRESH

Upvotes: 1

Views: 1192

Answers (2)

esqew
esqew

Reputation: 44693

If you're referring to not changing the URL to redirect to another (in my experience), these "stealth redirects" are nothing more than frame-based redirects that take up the entire display:

<body style="height:100%;margin:0;padding:0;">
    <iframe width=100% height=100% src="http://stackoverflow.com"></iframe>
</body>

(jsFiddle)

Otherwise, you're going to need to set up a reverse proxy using something along the lines of mod_proxy (a necessity if the page you're "redirecting" to prohibits frames from external locations).

Upvotes: 1

Luke Cousins
Luke Cousins

Reputation: 2156

I don't think you do with just HTML. Can you run php? or another scripting language. You probably want to set an HTTP status code of 301 or 302 and redirect.

In php you'd do the following (I know you haven't specified php, but what you're asking is not possibly with just html/js).

header("HTTP/1.1 301 Moved Permanently");
header("Location: somewhere.php");
exit;

Upvotes: 1

Related Questions