Tags:
create new tag
, view all tags

Question

Currently, any user who goes to mywebsite.org automatically sees the "Main" web. Is there a way to configure TWiki so that they see "MyWeb" instead of the Main web?

I would like to do this INSIDE of TWiki- I'm trying to avoid using some kind of Apache redirect. I've checked TWikiVariables and TWikiPreferences, but I was unable to find anything there. I also checked in configure.pl - it's error free, and I don't think I should have to change the default webpage to refer to /bin/view.pl/MyWeb , as that seems kind of a weird hack.

Thanks.

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Unix
Web server: Apache
Perl version:  
Client OS: Win XP
Web Browser:  
Categories: Installation, Deployment

-- MaxPar - 06 May 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

According to the comments in TWiki.pm:

If either the web or the topic is defined, will generate a full url (including web and topic). Otherwise will generate only up to the script name. An undefined web will default to the main web name.
So it's hard-coded -- not configurable. And further on, a slightly different description:
WARNING if there is no web specification (in the web or topic parameters) the web defaults to $TWiki::cfg{UsersWebName}. If there is no topic specification, or the topic is '0', the topic defaults to the web home topic name.
The line of code that does that ( $web ||= $cfg{UsersWebName}; ) is in a function that is used a lot, so untolled things would break or work differently.

Compare that to the options you ruled out:

  1. Apache redirect:
    Alias / "<Drive>:/<...>/bin/view/MyWeb/WebHome"
  2. Editing the default web page (index.html):
    <html><head>
       <META HTTP-EQUIV=Refresh CONTENT="0; URL=bin/view/MyWeb/WebHome">
    </head>
    Logging on... [that's only if you have a slow single sign-on, like NTLM]
    </html>

-- SeanCMorgan - 06 May 2008

I hadn't though of looking in TWiki.pm for more info- thanks for pointing that out to me. You're right, it looks like just doing an Apache re-direct really is actually much easier.

In case anyone looking at this question at a later date is curious for what I did, I just added this to my .htaccess file in the root directory:

DirectoryIndex ./bin/view/DesiredHomeWeb/WebHome

-- MaxPar - 08 May 2008

 
Change status to:
Topic revision: r3 - 2008-05-08 - MaxPar
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.