redirect URL to lowercase

Using the realurl extension TYPO3 generate human-readable URL. If the visitor visits the page using uppercase of the URL, TYPO3 can generate the page (HTTP 200). if a search bot (Google) found this URL and indexed it, Google will declare the page as “double content” and punishes your page rank. How do we deal with this?

using the RewriteMap we can rewrite all uppercase to the lower case.

but there are another problems: files and GET parameter.

Files are easier to handle. Using RewriteCond we can check if the requested URL points to a file.

for GET parameter, we just change the regular expression to points everything between 2 slahes (/…/)

so in the end we have following rewrite rule

PS: RewriteMap can only be set in server config or vhost. So, putting this in htaccess won’t change anything :)

2 thoughts on “redirect URL to lowercase”

Leave a Reply

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