[Typo3-dev] How to build absolute URLs?

Steven Bagshaw steven.bagshaw at unv.org
Wed Jun 29 12:51:59 CEST 2005


Hi Ingo,

I am getting this problem too - missing index.php - but only in links in
RTEs (you can see my thread in typo3.english). My extension links are fine -
I use the APIs in the documentation Olivier Dobberkau mentioned.

I am not sure if these are related. Let me know if you make any progress!

Steven


"Ingo Renner" <typo3 at ingo-renner.com> wrote in message
news:mailman.1.1119985671.1551.typo3-dev at lists.netfielders.de...
> Hi all,
>
> as I'm facing this questions the second time today and I still haven't
> found a solution I'm asking for your help.
>
> suppose the following, you have some variables like:
>
> $urlParameters = array(
>   'tx_ttnews[year]'    => date('Y', $this->tt_news['datetime']),
>   'tx_ttnews[month]'   => date('m', $this->tt_news['datetime']),
>   'tx_ttnews[day]'     => date('d', $this->tt_news['datetime']),
>   'tx_ttnews[tt_news]' => $this->tt_news['uid']
> );
> you also have the page id in $pid.
>
> Now how to build the absolute URL to this page with these parameters?
>
> A first solution would be the following:
> t3lib_div::getIndpEnv('TYPO3_SITE_URL').$this->cObj->getTypoLink_URL($pid,
> $urlParameters)
>
> With realurl installed everything is fine and - depending on the realurl
> configuration might - return something like this:
> http://www.example.com/path/to/pid/news/2005/06/28/i-have-a-question.html
>
> Without realurl this would return in
>
http://www.example.com/?id=xyz&tt_news[year]=2005&tt_news[month]=06&tt_news[day]=28&tt_news[tt_news]=abc
>
> But as you might have noticed 'index.php' is missing - so I ask for your
> advice: How to create absolute URLs?
>
>
> thanks in advance
> Ingo
>
> -- 
> Use a newsreader! Check out
> http://typo3.org/community/mailing-lists/use-a-news-reader/






More information about the TYPO3-dev mailing list