You are here: TWiki> Codev Web>FixedScriptUrlPath (2001-08-26, PeterThoeny)
Tags:
create new tag
, view all tags
I think the following code: (bin/wiki.pm, line 166, Dec2001 release)
# initialize $urlHost and $scriptUrlPath
if( ( $theUrl ) && ( $theUrl =~ /^([^\:]*\:\/\/[^\/]*)(.*)\/.*$/ ) && ( $2 ) ) {
$urlHost = $1;
$scriptUrlPath = $2;

is false. The red line setting the $scriptUrlPath can be fooled in many occasions where the web server redirects from another URL, and I dont see a case where it could be useful.

I guess this code may at some time allowed TWiki web sites to be copied elsewhere and still work without touching the wikicfg.pm, but it seems really not worth the trouble to me. Better edit the wikicfg.pm rather than risking annoying bugs.

So I propose we just remove the line:

$scriptUrlPath = $2;

related topics: RefreshEditPage, SCRIPTURLNotSetCorrectly

-- ColasNahaboo - 20 Apr 2001

The reason for getting the URL path from the environment is for installations where the URL is different, depending on the invocation. I.e. direct access or via proxy server.

The latest version has now a $doGetScriptUrlFromCgi flag in TWiki.cfg where youcan control one or the other behaviour.

-- PeterThoeny - 25 Aug 2001

TopicClassification:
BugResolved
Topic revision: r3 - 2001-08-26 - 05:35:25 - PeterThoeny
 

Codev

share: Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon
Twiki, Inc.
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.