Wordpress

Remove index.php from WordPress URL

Pinterest LinkedIn Tumblr
  1. Check if your hosting mod_rewrite is enabled by creating a file phpinfo.php with content.
  2. Set the permalink structure

Go to Dashboard > Settings > Permalinks and choose “Custom Structure” option and enter in the field: /%postname%/ and click on the Save Changes button.

  1. Edit your .htaccess file

Copy the following directive into your .htaccess file which is located in the root of your website folder:

# 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

Write A Comment