Automatic href

J

JohnW

I 'd like to have people who go to one of my sites to be automatically
forewarded to another site.

How can I do this in HTML - in the Index.html file?

I could write a simple <a href="http://XD">XD</a> but that would
require the visitor to "click" to go to the other site.
 
B

Beauregard T. Shagnasty

JohnW said:
I 'd like to have people who go to one of my sites to be automatically
forewarded to another site.

Do you mean from the first site's main page?
How can I do this in HTML - in the Index.html file?

I could write a simple <a href="http://XD">XD</a> but that would
require the visitor to "click" to go to the other site.

You could use a meta refresh statement which would do what you ask, but
will break the visitor's Back button. Not polite.

It would be best to use a tastefully designed page, with some relevant
text telling them why you want to redirect them, and giving them the
link if they choose to do it.
 
E

Ed Mullen

JohnW said:
I 'd like to have people who go to one of my sites to be automatically
forewarded to another site.

How can I do this in HTML - in the Index.html file?

I could write a simple <a href="http://XD">XD</a> but that would
require the visitor to "click" to go to the other site.

http://www.google.com/search?query=meta refresh&num=50

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
A shark is the only fish that can blink with both eyes.
 
J

Jonathan N. Little

JohnW said:
I 'd like to have people who go to one of my sites to be automatically
forewarded to another site.

How can I do this in HTML - in the Index.html file?

I could write a simple <a href="http://XD">XD</a> but that would
require the visitor to "click" to go to the other site.

I think what you are looking for is called 'redirection', typically used
when your change or get a domain name.

example 1 where you change domain
www.olddomain.com >> www.newdomain.com

example 2 where you stop using your freebe ISP space and get real hosting

www.myISP.com/~freebeUserHosting >> www.newdomain.com

If is explain your situation then metta-refresh method in the index page
of the 'old' URL but this is really a poor method

If old hosting is Apache you can use (if allowed) an .htaccess file in
your old server to redirect:

RewriteEngine on
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

If you don't have the .htaccess option then if you have CGI on old
server you can make you old sites index page a PHP file and rewite the
header

example index.php:

$newDomain="http://www.example.com" //your new domain
$requestURI=$_SERVER['REQUEST_URI'];
header("Location: $newDomain$requestURI");
exit;
 
J

JohnW

Do you mean from the first site's main page?


You could use a meta refresh statement which would do what you ask, but
will break the visitor's Back button. Not polite.

It would be best to use a tastefully designed page, with some relevant
text telling them why you want to redirect them, and giving them the
link if they choose to do it.

Ah Ha! Meta Refresh Tag. Thanks - just what I was looking for.
 

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

Members online

No members online now.

Forum statistics

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

Latest Threads

Top