1) Open notepad or some text editor and paste this code in it:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<!-- Set the default document -->
<files>
<remove value="index.php" />
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed"/>
<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>
and save it as web.config. (before save please ensure that it is saving as "All files" & not "Text Document" type)
2). Open you .htaccess file and delete all its content and add this code:
# 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
3). Lastly, Change the file permission for your .htaccess and web.config file to Read, Write and Edit mode.
Now go back to your WordPress Dashboard –> Permalinks. Index.php should be removed from permalinks. If you still face any issues, get in touch with me. I would be happy to help you.
source: http://webloggerz.com/how-to-remove-index-php-from-wordpress-url/
No comments:
Post a Comment