Bug: Missing REQUEST_URI causes bad link
Running TWiki on an ISP (BSDOS) the links on the main webhome page all have the file path int the URL as in:
http://www.dynalt.com//c23/dynalt/HiddenVilla/TWiki/bin/view.cgi/Main/WebHome
Test case
Environment
| TWiki version: |
01 Dec 2001 |
| TWiki plugins: |
Default |
| Server OS: |
BSDOS |
| Web server: |
Apache/1.3.6 (Unix) mod_ssl/2.3.5 OpenSSL/0.9.3a |
| Perl version: |
5.00503 |
| Client OS: |
Win98SE |
| Web Browser: |
Opera 6.0 |
--
GaroldJohnson - 03 Mar 2002
Follow up
Fix record
What I tried is getting SCRIPT_NAME if REQUEST_URI was null.
In view, main (about line 164) I added:
unless ( $url )
{ # Try SCRIPT_NAME -- glj -- 2002 Mar 03
$url = $ENV{"SCRIPT_NAME"};
}
This fixes the symptom, but I don't understand why one environment variable shows up while the other one doesn't since testenv shows both variables having the same value.
If neither of these is present, the 'else' clause creates the same problem because SCRIPT_FILENAME has the path information in it. I originally tried a patch at this point, but decided in favor of the one above.
--
GaroldJohnson - 03 Mar 2002
This may be something to do with PATH_INFO - try doing /bin/testenv/foo/bar and see what is reported in the environment variables. Also, download the
testenv from
CookbookActivePerlTestenv as this will report the PATH_INFO directly, and try Googling for suitable pages on Apache email lists about these keywords.
If the PATH_INFO is not /foo/bar in this example, see
CobaltRaqInstall and try the patch there.
--
RichardDonkin - 03 Mar 2002
Probably a duplicate of
CobaltRaqInstall, can re-open if this is still an issue.
--
RichardDonkin - 19 Feb 2004