[TYPO3-dev] Using CDN with Typo3

John Angel johnange at gmail.com
Sat Jan 10 17:40:50 CET 2009


Hi,


> ereg* is slow, preg_* is much faster. Your example above does not take
> config.absRefprefix into account. TYPO3 can be configured to add absRefPrefix to the
> typo3temp/ directory too. So I would either use a regular expression or two str_replace()
> calls. If you use str_replace, you will need to consider domains too because page can have
> several domains.


So it still looks like the safest thing to replace: 

img src="typo3temp

This will not replace img src="http://..../typo3temp meaning there is no problem with absRefPrefix and several domains?

Maybe the best thing is to configure replacement strings via TS, like:

tx_something.search1=img src="typo3temp
tx_something.replace1=img src="http://mycdn.com/ 

Regards,
John






More information about the TYPO3-dev mailing list