Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect an entire webpage...

Status
Not open for further replies.

linuxtricks

IS-IT--Management
May 24, 2000
111
0
0
US
My companies website is going under construction. I'd like to be able to have any page that is accessed on the website redirected to an "Under Construction" page.

What is the best way of doing this? ---
Try not. Do. Or do not. There is no try.
 
I use this HTML code to redirect automatically to another page without intervention:

<meta http-equiv=&quot;REFRESH&quot;
content=&quot;4;URL=http://domain.com/index2.htm&quot;>

Insert this in the <head> section of code. The &quot;4&quot; is a 4-second timer, you can pick the appropriate interval.

Don't know if there's an efficient way to do a mass update on all your pages to redirect, but you can put this in your main page.
 
Actually, I was looking to redirect more than just one page. More like the entire domain. =)

Nevertheless, I got it going.
I did this:

1. vi httpd.conf
ErrorDocument 404 ErrorDocument 402 ErrorDocument 500
2. mv htdocs/ htdocs.bak/

3. mkdir htdocs/

Then, just created an under construction page called 'index.html' and put it onto the htdocs folder.

Now, when someone enters they get redirected to the htdocs/index.html file.

Works great. Thanks!

---
Try not. Do. Or do not. There is no try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top