0 votes
Common cause of 404 Page Not Found Error is due to Permalinks.

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change.
asked by (6.1k points)
edited by

1 Answer

0 votes

On Linux system :

"Pretty" permalinks usually require, Apache web server with the mod_rewrite module installed

In WordPress's home directory,

    * The FollowSymLinks option enabled
    * FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All)
    * An .htaccess file (if this file is missing, WordPress will try to create it when you activate "pretty" permalinks)
    * If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.

NOTE : WordPress will play nice with an existing .htaccess and will not delete any existing RewriteRules or other directives. If you have other mod_rewrite rules, put yours before WordPress's.

You can edit the .htaccess file by FTP, shell, or (possibly) your host's control panel.

The following permalink rewrite code should be included in your .htaccess file:

Before WordPress 3.0

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Since WordPress 3.0

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

On Windows system :

"Pretty" permalinks usually require mod_rewrite, and IIS (common on Windows servers) does not support mod_rewrite. (If you are using Apache 2.0.54, on Windows, mod_rewrite may work, provided it is enabled in apache\conf\httpd.conf.)

If you are using IIS 7 and have admin rights on your server, you can use Microsoft's URL Rewrite Module instead. Though not completely compatible with mod_rewrite, it does support WordPress's pretty permalinks. Once installed, open the web.config file in the WordPress folder and add the following rule to the system.webServer element

 

<configuration>
   <system.webServer>
    <rewrite>
        <rules>
            <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" />
                </conditions>
                <action type="Rewrite" url="index.php/{R:0}" />
            </rule>
        </rules>
    </rewrite>
   </system.webServer>
</configuration>

 

answered by (6.1k points)
...