You don't want to just abandon all those old links, but you have just registered a new domain name COOLNAME.ORG. And it will be hosted someplace else.
You want to arrange things so that any time someone goes to http://petra.greens.org/hairy/old/url/anything, her web browser will magically end up at http://www.coolname.org/anything instead. And you want it to happen instantly, and you don't want to break your visitor's BACK button. And you don't want to use Javascript.
/w/hairy/old/url
on petra.
Go to that directory and create a file named .htaccess
containing a line like this:
Redirect /hairy/old/url http://www.coolname.org
An easy way to do that is to get a shell and type the commands
cd /w/hairy/old/url
echo 'Redirect /hairy/old/url http://www.coolname.org' >> .htaccess
exit
/v/cool/
)
contains a file plainfolks.html
.
Then the newspaper prints a story containing the URL
http://www.coolname.org/plainfools.html and they will
sell two million copies this morning! You could write a correction,
and place it at plainfools.html
,
but that would distract from your message. The elegant fix would be to
put a line in .htaccess
that says
Redirect /plainfools.html http://www.coolname.org/plainfolks.html
Redirect
is everything after the
hostname in the old URL. The last thing on the line is the new URL.