Problem with permalinks
-
I am having some problems with my permalinks, and the the story’s a little convoluted, so I will try to be concise.
I developed my client’s site as a subdomain of my url i.e. clientx.philbonsai.com on Server 2008 and MySQL. The permalink structure was switched /%postname%. We continued to develop and test under that subdomain until we were ready to launch. I transferred the source files to clientx.com, updated dashboard to reference clientx.com and kept the db on clientx.philbonsai.com. As a result, the homepage rendered fine, but the other pages didn’t, throwing a server 404.
Looking through MySQL, the wp_posts table’s guid column still referenced clientx.philbonsai.com. After updating the db, the pages still weren’t rendering right, so I changed the permalinks back to the default setting and the pages were fine. Now changing the permalinks to different settings breaks the pages, and no matter what the setting is, the link structure continues to follow /%postname%.
I don’t have an .htaccess file and I tried using a URL rewrite to force a canonical url e.g. http://www.clientx.com as opposed to clientx.com. The URL rewrite isn’t working. This is my web.config file with the permalink changed to /%postname% :
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse enabled="false"/> <defaultDocument> <files> <clear/> <add value="Default.htm"/> <add value="Default.asp"/> <add value="index.htm"/> <add value="index.html"/> <add value="iisstart.htm"/> <add value="default.aspx"/> <add value="index.php"/> </files> </defaultDocument> <rewrite> <rules><rule name="CanonicalHostNameRule1"><match url="(.*)"/><conditions><add input="{HTTP_HOST}" pattern="^www\.office365advisors\.com$" negate="true"/></conditions><action type="Redirect" url="http://www.office365advisors.com/{R:1}"/></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> </system.webServer> </configuration>Is there another value that I need to change in the db? Or a setting in the WP Admin? I would really appreciate any insight or help that could be provided. Thanks in advance!
Phil
The topic ‘Problem with permalinks’ is closed to new replies.