Tags:
create new tag
, view all tags

Redirect by Subdomain Add-On

Here's something I just knocked up.

I wanted to route requests for different *.wiki.companyname.com address to a specific webs without having to create lots of separate redirections in IIS.

In our company we have all wiki DNS names pointing at the same IP address. The attached script redirects the user.

The code

The redirectsHash is just a set of defaults. The TWiki.RedirectBySubdomain topic lists what needs to be mapped.

There is a very handy $debug = 1 setting you can make in the file :^)

Caveats

I haven't tested the configuration in that file as I didn't want to mention all our internal sites to the world.

Add-On Installation Instructions

Note: You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.

  • Download the ZIP file from the Add-on Home (see below)
  • Unzip redirect.zip in your twiki installation directory

Plugin Info

  • Set SHORTDESCRIPTION = Redirect subdomains to TWiki webs

Add-on Author: TWiki:Main/MartinCleaver
Add-on Version: 26 Nov 2001 (v1.000)
Change History:  
26 Nov 2001: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/RedirectBySubdomainAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/RedirectBySubdomainAddOnDev

Related Topic: TWikiAddOns

-- TWiki:Main/MartinCleaver - 26 Nov 2001

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip redirect.zip r1 manage 1.6 K 2001-11-26 - 21:41 MartinCleaver  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2006-11-04 - 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.