I have a problem with index.php in my WordPress website. This problem is arriving since I have changed and migrated my WordPress database from WordPress to mydatabase. I have also changed my table prefix name.
Now problem is that, I am unable to see my pages and posts without index.php
.
http://example.com/index.php/postname/
I have tried the following solutions:
Change permalinks setting (nothing changed).
Change rewrite module with .htaccess file (nothing changed).
Enable rewrite module in my apache2 server (nothing happened).
Deleted value of rewrite_module of wp_options table for cache purpose (nothing happened).
If i set permalink for %postname%
e. g. http://example.com/postname/
Then i get 404 error.
My .htaccess code is:
# 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
Please anybody provide me correct solution. How to get rid of index.php
?