[Typo3-dev] RealURLs online!

Martin Poelstra martin at beryllium.net
Tue Jan 20 04:07:39 CET 2004


Hi again,

Just had to change the first version again as it didn't work correctly
on one of my test-sites. The problem was in detecting the pathPrefix, as
I called it. This is the path, relative to the documentroot, where Typo
is installed.
Does anyone know of a simple and widely usable way to figure out what
this path is?
E.g., if you now have URLs like
www.server.com/path/to/typo/index.php?id=12, then the pathPrefix would
be path/to/typo/. The problem is that this URL gets rewritten, so you
usually only get the original request in the variables, but not the
place in the URL where the index.php would reside.
As far as I could see there's no way to (directly) extract this from the
available HTTP_SERVER_VARS, nor via t3lib_div::getIndpEnv().
Anyone an idea?

Grtz,
Martin

P.S. Sorry for replying to my own e-mail :)
P.P.S. I implemented a hack, so it works again, but it's not going to
win any prices for elegance...






More information about the TYPO3-dev mailing list