[TYPO3-english] Typo3 site in subdirectory of localhost

Erdal Gök comm at webcan.de
Sun Jul 1 22:02:01 CEST 2012


Hi Jamie,

Jamie Kowalski wrote:
> I've recently begun familiarizing myself with Typo3 for a project. I've
> installed the introduction package on localhost, and since I have a number
> of web projects and experiments on localhost, they're all in subdirectories
> of my root folder.
>
> Unfortunately, Typo3 is constructing all the links in the font-end relative
> to the root (the back-end works correctly). I've been searching for a way
> to specify a root folder, or some other fix. I came across PATH_site, but
> it doesn't look like something that can/should be messed with. Perhaps
> realurls are the answer? Any help/pointers would be greatly appreciated.

You could define virtual hosts in the web server software.

But I normally work in sub directories too and don't have such problems.
I usually install realurl and so have to change the .htaccess file.

RewriteEngine On
RewriteBase /NameOfSubdir/

[here some other stuff, which you find in the .htaccess example or 
realurl docu]

and in Typoscript | setup

config.simulateStaticDocuments = 0
config.baseURL = http://localhost/NameOfSubdir/
config.tx_realurl_enable = 1

Good luck

Erdal







More information about the TYPO3-english mailing list