View Full Version : html page that directs you to a different page?
Jan 15, 2008, 09:47 PM
Say you have sent out a link to a certain webpage on your site, but you changed the site and now the old link is dead. is it possible to set up an html file at the old link that automatically directs the browser to the new page?
i feel like this should be an easy answer... i just don't know it!
Jan 15, 2008, 10:31 PM
Two ways to accomplish:
HTML: <meta http-equiv="refresh"
content="0;url=http://new.url" /> -- You can change the "0" to a different wait time till redirect. That's helpful if you put in a dummy page saying why they're being redirected.
Apache web server: Redirect 301 /oldpage http://new.com/file.html -- The 301 means it's a permanent redirect. The destination URL must be the full thing, http and all. For further reading, http://httpd.apache.org/docs/1.3/mod/mod_alias.html
Additional reading for your pleasure, http://www.yolinux.com/TUTORIALS/ApacheRedirect.html
Jan 16, 2008, 01:11 AM
How's about this for a complete page?
Can't for the life of me remember where I got it, so comments welcome. Anyway, I've used it.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= welcome.html" /></head><body></body></html>
Jan 16, 2008, 02:19 PM
thanks guys, that worked great!