• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Too many redirects

Valhalla

Well-known member
#1
This is when using IIS 7.5.

I'm following the instructions here to enable friendly URLs by putting the following into a web.config file. It seems to work correctly, apart from when visiting the Index page where it fails to load the page because of "Too many redirects".

I'm using a subdomain as my URL, hopefully without an additional directory (either 'community' or 'forum').

Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^.*$" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                    </conditions>
                    <action type="None" />
                </rule>
                <rule name="Imported Rule 2" stopProcessing="true">
                    <match url="^(data|js|styles|install)" />
                    <action type="None" />
                </rule>
                <rule name="Imported Rule 3" stopProcessing="true">
                    <match url="^.*$" />
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
        <httpErrors existingResponse="PassThrough" />
    </system.webServer>
</configuration>
 

Mike

XenForo developer
Staff member
#2
We'd need to see this in place (to see what redirect is being run). There's no redirect from the rewrite rules in web.config, but there is URL canonicalization stuff in XF that can trigger a redirect.
 

Valhalla

Well-known member
#3
Thanks - it actually seems to work now.

I was using Safari which gave that behaviour, but when I tried on another browser it worked fine.