Tags:
create new tag
view all tags

Question

I have successfully migrated a TWiki from one server to a new server with your latest software. I want to be able to "turn off" The TWiki on one machine while I prepare it on the other. I guess this can be accomplished in Apache, but was wondering if there was a TWiki way of redirecting access to any TWiki page to either the new Twiki on the new machine or a web page outside the realm of the TWiki.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: N/A
Server OS: N/A
Web server: N/A
Perl version: N/A
Client OS: N/A
Web Browser: N/A
Categories: Deployment

-- TWikiGuest - 12 May 2005

Answer

You can add this to any topic you want to have redirected to a new URL:

This topic has moved to http://new.server/cgi-bin/view/%WEB%/%TOPIC%, you will be redirected in 15 seconds
<meta http-equiv="refresh" content="15; URL=http://new.server/cgi-bin/view/%WEB%/%TOPIC%">

This will redirect to the URL on the new server after 15 seconds. If you want to have this for all topics you can create a new skin that does the redirect and set it as the default skin in your TWikiPreferences.

How to create a redirect skin:

  • In twiki/templates copy view.print.tmpl to view.redirect.tmpl
  • Edit view.redirect.tmpl and
    • add above meta http-equiv="refresh" tag to the head section
    • and replace:
      %TEXT%
      %META{"form"}%
      %META{"attachments"}%
      with this:
      This topic has moved to http://new.server/cgi-bin/view/%WEB%/%TOPIC%, you will be redirected in 15 seconds

-- PeterThoeny - 12 May 2005

Topic revision: r1 - 2005-05-12 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.