homepage Welcome to WebmasterWorld Guest from 54.211.97.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Redirect all page requests to a single page?
jmcnally

10+ Year Member



 
Msg#: 5372 posted 6:23 pm on Jan 18, 2006 (gmt 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!

 

jdMorgan

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



 
Msg#: 5372 posted 2:30 pm on Jan 19, 2006 (gmt 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

JerryOdom

10+ Year Member



 
Msg#: 5372 posted 2:51 pm on Jan 19, 2006 (gmt 0)

I'd never take down old content even if I were replacing it. But yes it can be done.

jmcnally

10+ Year Member



 
Msg#: 5372 posted 3:13 pm on Jan 19, 2006 (gmt 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?

LeChuck

5+ Year Member



 
Msg#: 5372 posted 3:20 pm on Jan 19, 2006 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved