[TYPO3-english] How get site url

Krystian Szymukowicz t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Mon Sep 13 17:21:57 CEST 2010


On 2010-09-13 17:03, Constantin Iliescu wrote:
> Hello, list members!
>
> Please tell me what is the best way to get the site url.
>
> I tried $this->cObj->currentPageUrl(), but it returns only the relative url.
>
>

hi

t3lib_div::getIndpEnv('TYPO3_SITE_URL');


Other vars you can get this way are:
SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_INFO, REMOTE_ADDR, 
REMOTE_HOST, HTTP_REFERER, HTTP_HOST, HTTP_USER_AGENT, 
HTTP_ACCEPT_LANGUAGE, QUERY_STRING, TYPO3_DOCUMENT_ROOT, 
TYPO3_HOST_ONLY, TYPO3_HOST_ONLY, TYPO3_REQUEST_HOST, TYPO3_REQUEST_URL, 
TYPO3_REQUEST_SCRIPT, TYPO3_REQUEST_DIR, TYPO3_SITE_URL


--
grtz
Krystian Szymukowicz


More information about the TYPO3-english mailing list