[TYPO3-dev] running 6.2 in a subfolder - relative path to image fails

Alex Bigott a.bigott at pixel-ink.de
Wed Aug 13 15:30:08 CEST 2014


Hi,

i am forced to have a site running in a subfolder on the original domain.
I run it in http://www.mydomain.de/beta

in the config typoscript i set
config {
baseURL = http://www.mydomain.de/beta
absRefPrefix = http://www.mydomain.de/beta
}

The site itself now runs fine.

But i am having trouble setting image src-links in my view helpers.
I am using 
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath() to get 
the relative path to my images (which works fine on another DEV machine, 
where typo3 is istalled in the root).
The resulting path is 
"../typo3conf/ext/news_extent/Resources/Public/Icons/featuredLinks/link.png" 
which does not work on the beta machine.

Is there any way to get the "beta" part from the URL to be considered 
here? (Or is there a better way to setup typo3 in a subfolder at all?)

I would really like not to do too much hassle to fix this issue, since 
it is only temporary, but still consider it to be something i would like 
to know :)

Thanks a lot

Alex







More information about the TYPO3-dev mailing list