Re: problem using CGI.requestURI
Brandon Long <[email protected]> Sun, 27 Jan 2008 14:54:12 -0800
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Organization | Fiction L Networks |
| Message-ID | <20080127225412.GA16656@bl1> |
On 01/26/08 zeegco uttered the following other thing:
> Hi every body,
> I have a question about using "CGI.requestURI".
> I want to know what is the URL of my current page, so I use this code
> in my template:
> <?cs var:CGI.RequestURI ?>
>
> but when users are came from another site to my site, RequestURI
> starts with double slashes (//) instead of single slash (/), for
> example:
> //MyCurrentPage.py (instead of: /MyCurrentPage.py)
>
> why do this happen and how can I resolve this problem?
This is due to the fact that the webserver you are using is mapping web
addresses to the file system.
The file system doesn't care how many forward slashes there are.
Someone could type that in, but chances are its because some link is
pointing to it with multiple slashes. There are probably apache modules
to make that not work (or maybe even a setting, I don't know).. or you
could try and fix the broken links, or just make it work on your end.
Brandon
--
"He felt that his whole life was some kind of dream and he sometimes
wondered whose it was and whether they were enjoying it."
-- Douglas Adams http://www.fiction.net/blong/