Welcome to WebmasterWorld Guest from 54.166.236.238

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Redirect all page requests to a single page?

     
6:23 pm on Jan 18, 2006 (gmt 0)

New User

10+ Year Member

joined:Nov 24, 2003
posts:4
votes: 0


I need to take our company site offline for a month, and instead of actually removing the content, I just want to make it unavailable. Is there any way to use .htaccess to direct *ALL* page requests to forward to a single URL (a notice page telling visitors about the downtime)?

I've seen lots of information about remapping directories to new directories, or specific pages to new page locations, but not remapping an entire site to one specific URL.

Can it be done?

Thanks!

2:30 pm on Jan 19, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


This can be done with a single RedirectMatch or RewriteRule directive, but I'd be remiss if I didn't say that it's probably a bad idea, and will make your compnay seem 'unprofessional' on the Web, as well as possbily destroying your search engine rankings for several months.

If the reason for this action is that you need to put up a new site and test it on-line, then consider developing and testing your new site in a separate subdirectory or on a separate subdomain and switching over 'all at once' after you're finished testing, rather than taking your existing site down for the duration of the development project.

For more information on mod_rewrite and related subjects, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

2:51 pm on Jan 19, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Sept 9, 2004
posts:643
votes: 0


I'd never take down old content even if I were replacing it. But yes it can be done.
3:13 pm on Jan 19, 2006 (gmt 0)

New User

10+ Year Member

joined:Nov 24, 2003
posts:4
votes: 0


Thanks for your advice, guys, but it's a little more complicated than that. Our company, a wine importer, violated one of the many rules some years ago and after fighting the case in court, we've decided to take our punishment. One month suspension, during which time we cannot conduct *any* business activity. The regulators consider our web site a "sales tool" and so it must be taken down for 30 days.

Crazy, isn't it?

I'd like to do this with as little damage to our search engine ranking as possible. Will a temporary redirect be effective for this?

3:20 pm on Jan 19, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 12, 2005
posts:136
votes: 0


Maybe a 503 ( [w3.org...] ) with RetryAfter set to 1 month? Don't know if the SE's understand this though.

Or 302, yes. But Google is rolling out some 302-fixes.