Joseph Michael Pesch
VP Programming

Wordpress 404 Error When Using Permalinks /%postname%/

by 19. August 2013 20:43

Put the following content in the .htaccess file in the root folder:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

 Add Rewrite to web.config:

<?xml version="1.0" encoding="UTF-8"?>
    <directoryBrowse enabled="false" />
        <clear />
        <add value="index.php" />
        <rule name="Main Rule" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          <action type="Rewrite" url="index.php/{R:0}" />


PHP | Wordpress