In Godaddy wordpress site not showing inner pages, It show only home page and wordpress admin page. While click save changes in “Permalink Settings” it show “You should update your web.config now.” While I add web.config in my site it show 500 error(Home page and admin page also) Now what to do? fix 500 error or fix 404 error and how to fix? kindly help me. my .htaccess file is below
# 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
Advertisement
Answer
you are using windows server, so you need web.config in root folder of wordpress,
If web.config not found on root folder, then add web.config file and add the code below into it,
<?xml version="1.0" encoding="utf-8"?> <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" /> </rule> </rules> </rewrite> <staticContent> <remove fileExtension=".svg" /> <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> </staticContent> <defaultDocument> <files> <remove value="index.aspx" /> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration>
root folder means, the folder which contains wp-content, wp-includes etc.,
If in case, home page is throwing 500 error, then try removing the whole <defaultDocument>
tag section
<defaultDocument> <files> <remove value="index.aspx" /> <add value="index.php" /> </files> </defaultDocument>