2/22/2015

Typo3: Getting RealURL to Work on IIS7

Here are the high-level steps:
  • Enable the URL Rewrite extension that comes with IIS7
  • In the URL Rewrite configuration click "Import Rules" and choose the htaccess file that comes with Typo3 - there will be one error, locate it and just remove the offending line, then click "Apply"
  • Finally, to make sure RealURL "knows" the original request, you need to define a server variable:
    • under URL Rewrite define a server variable named "HTTP_X_REWRITE_URL" (without the quotes) - this is the variable RealURL uses internally
    • Then go back to the URL Rewrite rules and edit the last rule: ddd a Server Variable there, and set its value to "{REQUEST_URI}" (without the quotes)

Now RealURL should work like a charm.

Sources:
http://www.typo3forum.net/forum/typo3-fragen-probleme/47634-iis-7-5-short-urls.html about importing htaccess rules
http://www.iis.net/learn/extensions/url-rewrite-module/setting-http-request-headers-and-iis-server-variables on configuring IIS URL Rewrite rules

No comments:

adaxas Web Directory