Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web.config for azure sites and wordpress

Options
  • 11-06-2015 10:57pm
    #1
    Registered Users Posts: 2,786 ✭✭✭


    Hi guys I hope this is the right section for this topic

    I have a wordpress site hosted on azure sites and I got a domain from godaddy, have that mapped correctly, but the permalinks are causing some hassle in wordpress.
    When i type mysite.com it works fine or mysite.com/link1 it loads correctly but when i click any links in the site it redirects to mysite.azurewebsites.net/link1

    here is my webconfig
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
      <rewrite><rules>
    		
    			<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></system.webServer>
    </configuration>
    

    I tried adding something like this
    <httpRedirect enabled="true" destination="http://foo.com/" httpResponseStatus="Permanent" />
    

    it seems to be redirecting fine,but i'm getting a redirect loop error, does anyone have a solution to this or any easier solution to the problem as a whole?
    thanks


Comments

  • Registered Users Posts: 2,790 ✭✭✭John_Mc


    mightyreds wrote: »
    Hi guys I hope this is the right section for this topic

    I have a wordpress site hosted on azure sites and I got a domain from godaddy, have that mapped correctly, but the permalinks are causing some hassle in wordpress.
    When i type mysite.com it works fine or mysite.com/link1 it loads correctly but when i click any links in the site it redirects to mysite.azurewebsites.net/link1

    here is my webconfig
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
      <rewrite><rules>
    		
    			<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></system.webServer>
    </configuration>
    

    I tried adding something like this
    <httpRedirect enabled="true" destination="http://foo.com/" httpResponseStatus="Permanent" />
    

    it seems to be redirecting fine,but i'm getting a redirect loop error, does anyone have a solution to this or any easier solution to the problem as a whole?
    thanks

    I think you need to perform DB Updates using SQL to update the pages and posts that have URLs on them. That's what we did anyway and it worked fine. Not difficult at all really


  • Registered Users Posts: 2,786 ✭✭✭mightyreds


    Thanks John got that going all working well now


Advertisement