Skip to content

Manual configuration

Dmitry Dulepov edited this page Aug 13, 2019 · 5 revisions

To create manual configuration, make sure that automatic configuration is off in the extension settings in the Extension Manager. Then create a new file named typo3conf/realurl_conf.php with the following content:

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array(
    'example.com' => array(
        'init' => array(
            'appendMissingSlash' => 'ifNotFile,redirect',
            'emptyUrlReturnValue' => '/',
        ),
        'pagePath' => array(
            'rootpage_id' => 1,
        ),
        'preVars' => array(),
        'fixedPostVars' => array()
        ),
        'postVarSets' => array(
            '_DEFAULT' => array(
            ),
        ),
        'fileName' => array(
            'defaultToHTMLsuffixOnPrev' => 0,
            'acceptHTMLsuffix' => 1,
        ),
    ),

    'www.example.com' => 'example.com',
);

This adds RealURL configuration for domains example.com and www.example.com. Notice how www.example.com is aliased to use the same configuration as example.com. You absolutely must have all domains configured in RealURL. Failing to do so may result in wrong URLs on any domain in your installation.

Important: you can leave everything out from this configuration except one setting: pagePath/rootpage_id. That setting is absolutely mandatory and required! If you do not have, most likely your configuration will not work correctly. Make sure that you set a proper root page id (= the home page of your site) there!

If your site uses multiple languages, you absolutely must configure them correctly as described here. Any deviation from those instructions will cause misbehavior with languages. You have been warned.

All possible options are available in the Configuration reference.