1

I would like some pointers on fixing the Permalinks structure for a custom post type I added. Like many Custom Post Types this plugin uses the Custom Type Meta Box, and sets a featured image. All of that is working as expected except for one really small aggravating issue. The View Image Button on the Edit Option and the View Link on the Overview Page are creating a permalink that is redirected to a 404 Error page. I need to know what to add to my web.config file to redirect this properly. As a Side Effect the GetShortlink Link is redirecting to the invalid Pretty URL.

My web.config:

<?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>

Taken from StackOverflow: Permalink Structure

The Issue has been reported before, not by me. See Permalink Problem. The issue is identical. I'd like to be able to report in that thread as the OP never gave any info.


Things I've Done

  1. Disabled the Pretty Permalinks. This still produces a 404.
  2. Started with a Default web.config. (Above) This still produces a 404.
  3. Set Rewrite to False in the Custom Post Type Array to see the link structure. This still produces a 404.
  4. Deleted and Recreated Post. This still produces a 404.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.