Mar 31, 2009

Automatic RealURL configuration howto

RealURL includes an automatic configuration feature. It allows to have a basic TYPO3 web site with RealURL running very fast.
Automatic RealURL configuration examines the web site and creates all necessary configuration for the RealURL to run. There are certain rules that web masters should know if they want automatic configuration to work properly.

How to use automatic configuration

There is nothing special to do. It just works. Install RealURL and automatic configuration runs and configures RealURL for this web site.

How to use automatic configuration properly

'Properly' is the main word here. Automatic configuration is simple and enough for 90% of hosts out there. But there are certain rules to make it work properly.

Automatic configuration looks for the domain records and installed extensions in order to create the RealURL configuration. It runs immediately after extension installation. Once done, it is not invoked anymore. This means that adding new or changing existing domains after RealURL installation does not result in automatic updates of the generated configuration. This is a very important issue to remember, so I will make it bold and repeat:
Automatic RealURL configuration runs only if the configuration does not exist yet.
This implies several things that web masters should do in the right order:
  • Create all domain records first
  • Install extensions that hook to RealURL automatic configuration next
  • Install RealURL last
This ensures that automatic configuration takes all domains and extensions into account.

Oops. I just added a new domain...

So you have added a new domain. What can you do to force reconfiguration? You will go to your web site file system looking for the typo3conf/realurl_autoconf.php file. Remove it and RealURL will immediately regenerate the configuration. It is as simple as that.

Creating manual RealURL configuration

Web masters can use automatic configuration to create a PHP file that they can use as a basis for the custom configuration. To do that choose 'PHP' as a automatic configuration format. When the configuration is generated, rename the typo3conf/realurl_autoconf.php file to typo3conf/realurl_conf.php file and edit it as you wish. It will already have all rootpage_id values, domains, etc.
Manual configuration is necessary of there are extensions that do not hook to automatic configuration with their variables.


Automatic configuration is several times faster than the manual one. By default automatic configuration is stored as a PHP serialized array. This is another good reason to use automatic configuration.


  1. Marcus BiesioroffMarch 31, 2009 at 4:48 PM

    Well, there is some trick, I made manual config, serialized it at the end and printout in the browser window:

    $serializedConfig = serialize($TYPO3_CONF_VARS['EXTCONF']['realurl']);


    after that I copied and pasted it to realurl_autoconf.php (after enabling automatic configurations of RealURL...) and it works, this is just serialized - manual config :)

  2. One thing: you do not have to pass it to realurl_autoconf.php ;) You can put it to realurl_conf.php and comment the original code :) I have plans to automatically rebuild autoconfiguration when domains are changed. This way your manual config can be accidentally overwritten.

  3. Is there any extention list that supports RealURL automatic configuration?

  4. Hi Dimitri

    I use version 1.9.3 and it does not generate any auto configuration file during installation in typo3conf. there is no realurl conf in localconf.php. directory is writable for the server. Any ideas how to get this auto conf file?

  5. I just had the same Problem.

    No realurl_autoconf was generated because

    powermail was installed. Powermail hinders realurl to generate the file.

  6. i had the very same issue. it is indeed powermail. what seems to be the problem that powermail hinders the autoconf of realurl?



  7. I added it as issue on Forge.



  8. Alex, answering your questions:

    When? — At the next request to TYPO3.

    Why? — Because it works that way.

    Where? — In the same place, where the original realurl_autoconf.php was.

    As to tags – I am not sure what you mean.