Mink Machine

Speaking URLs with Typo3

Note: This content is obsolete, and kept for archive purpose only.

I’ve been using Typo3 for a while and since it’s a fairly advanced system with many pitfalls, I would like to share some of my experiences concerning speaking URLs to other Typo3 users. The configurations I describe are more like guidelines, not written stone tablets from deities with beard.

A non-technical review can be found in another article, Experiences of Typo3 – The good, the bad and the ugly.

Speaking URLs

The standard look of Typo3 URLs, as with most PHP solutions using a database, looks like this:


But it would be better with:


based on the actual page context. Apart from aesthetic reasons there are other good reasons, such as search engine optimization. This makeover is done by using the extension RealURL in combination with web server modifications.

Web server configuration

If you are using the Apache web server, modify .htaccess like this:

RewriteEngine On RewriteRule ^typo3$ – [L] RewriteRule ^typo3/.*$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule .* index.php IndexIgnore *

The file should be located in the root of yourTypo3 tree. In order to use the .htaccess file, you must modify http.conf like this:

AllowOverride All

Note to Windows users: As you may know, a file cannot be renamed into “.something” directly from the Windows Explorer. Instead you may rename it using the command prompt, or open the file in an application such as Notepad and save it with the correct name.

If you prefer the Microsoft IIS web server, something like this will work as well:

[ISAPI_Rewrite] RewriteRule /(.*)\.(.+)\.(.+)\.html /index.php\?id=$2&type=$3

You may also want to increase the PHP heap a bit to avoid fuzzy error messages. To do this, modify php.ini like this:

memory_limit = 32M

Typo3 configuration

Template configuration

Now you are almost up and running. Just enter these lines into your Typo3 template:

config.simulateStaticDocuments = 0 config.baseURL = 1 config.tx_realurl_enable = 1

The first line disables simulateStaticDocuments, since the two techniques are incompatible.

View a page to see the result. You may have to clear the cache.

News configuration

But the fun doesn’t stop there! If you want news management on the site, and you usually do, there are further modifications ahead. The extension called tt_news is very flexible and an ideal choice for most applications. However, the standard version is not capable of generating nice URLs with RealURL, so it has to be modified a bit.

Start with version 2.1.1 of tt_news. This version must be downloaded and installed separately (T3X_tt_news-2_1_1.t3x), since it is not available directly from the extension manager.

Enter the Typo3 backend and create a sysfolder called News (for the news categories), like this:

Typo3 sysfolder Typo3 sysfolder.

Go to the News page (not the sysfolder) and modify it’s template by adding the following to the Constants field:

plugin.tt_news { file.templateFile = media/scripts/news_template.tmpl PIDitemDisplay = news_display_pid }

where news_display_pid is the id of your News page and news_template.tmpl is the HTML template.

Good luck!


  • avatar
    17 Apr, 2009

    Since no rootpage-id is defined, this code will not work.
    Besides: There are several values set, which don’t exist.
    Better use the official manual or the homepage of the developer of the extension.

  • avatar
    22 Apr, 2009

    Thanks Joerg for your input. This post is over three years old, so I expect a lot of things have happened to the Typo3 distribution since then, making some of this content obsolete.
    I hope that most developers use the official material for reference instead of blog posts.

  • avatar
    14 Jan, 2012

    Reine, please put an “Obsolete. For reference only.” stamp or something on top of this article.

  • avatar
    14 Jan, 2012

    Luis, good point! Will fix that.

Post a comment

Your email address will not be published. Required fields are marked *

Featured stories

Sessions in Seville

Sessions in Seville

"I end my journey in front of the tomb of Columbus, located inside the world’s largest Gothic cathedral."
Vineyards of southern France

Vineyards of southern France

"Not far from Sauternes is the village of Saint-Émilion, also a famous wine region but what got me hooked was their impressive limestone caves."
Roaming in Valletta

Roaming in Valletta

"I passed the statue of Jean de Valette, the 49th Grand Master who laid the foundation stone to Valletta in 1566, to gaze at the golden interior of St. John’s Co-Cathedral, where he is buried in the crypt."
Exploring Chernobyl

Exploring Chernobyl

"The soundtrack of the day was Radioactivity by Kraftwerk, as we rolled into Chernobyl this morning."
Conquering Machu Picchu

Conquering Machu Picchu

"A life-long dream came true this morning, as I stood upon the mountain looking down at Machu Picchu. I felt like some strange mix between Indiana Jones and a small boy, gazing down upon the final treasure of the Incas."
Wazzup in Vaduz

Wazzup in Vaduz

"Vaduz Castle is overlooking the town from a hill, a short walk from the center. It’s really a postcard view with the alps in the background, which I’m sure the prince enjoys as he sips his morning coffee while towering above his loyal subjects."


Fever Ray
Kuala Lumpur