[TYPO3] Realurl problem

Paul Kraft pk at lightwerk.com
Fri Jul 7 09:41:15 CEST 2006


Harald Klotzberg [decomplex audio HQ] wrote:
> I had the same prob, url´s generated well but only 1st level of the site
> structure displayed as expected.
> All others -> 404. Encoding/Decoding of URL´s are fine as well.
> 
> The prob on my machine isn´t realURL, it´s a server thing.
> There is a cgi-wrapper running (php as cgi). Normally it should work fine
> with Typo3,
> but not on this machine/configuration. There is a Out-of-the-Box-Package
> installed (pd-admin) with cgiwrapper, 
> the pd-admin-guys are trying to solve it (it´s not my machine, so it´s
> enough spending a day :) ). 
> So if you have pd-admin on your machine i suggest to wait ... the provider
> and me tried nearly everything,
> typo and realURL are OK, but it doesn´t work :(
> 
> if you see t3lib/class.t3lib_div.php you´ll find:
> 
> // Some CGI-versions (LA13CGI) and mod-rewrite rules on MODULE versions will
> deliver a 'wrong' DOCUMENT_ROOT (according to our description). Further
> various aliases/mod_rewrite rules can disturb this as well.
> // Therefore the DOCUMENT_ROOT is now always calculated as the
> SCRIPT_FILENAME minus the end part shared with SCRIPT_NAME.
> 
> so check pathes, maybe this solves your problem,
> see also info´s around line 2700, there is more path stuff and some useful
> info´s
> 
> if you have pd-admin, stay tuned until i get an reply from them, they´re
> trying to find the prob
Hi,

I have had the same problem, the first level of navigation worked fine 
but the second level showed the error message Error. Reason: Segment 
"page_title" was not a keyword for a postVarSet as expected!. I tried 
everything but at the end only a dirty workaround fixed the problem (for 
me). I replaced the line 671 (version 1.1.0) in class.tx_realurl.php
$speakingURIpath = $this->pObj->siteScript;
with
$speakingURIpath = substr($_SERVER["REQUEST_URI"],1);

short explanation:
I found the problem is the $this->pObj->siteScript call which returns 
only the filename, not the path. REQUEST_URI contains the path I need. 
substr just remove the leading slash. I guess the real reason is deeper 
in the pObj but this fix was enough for me.

Have a nice weekend.

-- 
Paul Kraft
Web Development
Lightwerk GmbH
Phone: +49-711-489497-170 Fax: -290
www.lightwerk.com   www.news4mobile.com



More information about the TYPO3-english mailing list