According to the above link your web.config is fine the problem is most likely with your database table for wordpress options..solution: login to database and be sure the set the url with www and not without www.
how to solve the redirect url loop error in wp config wordpress
-
23-09-2022 - |
Question
my website is on wordpress, i want to redirect my webiste from icap.org.pk to www.icap.org.pk , but when i changed in wp.config file its show me error "The page isn't redirecting properly".
here is my code please suggest me how to do that:
`<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^icap.org.pk$" />
</conditions>
<action type="Redirect" url="http://www.icap.org.pk/{R:0}" redirectType="Permanent" />
</rule>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
`
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow