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
Related Topic: TWikiAddOns
--
TWiki:Main/MartinCleaver
- 26 Nov 2001