How to remove index.php from WordPress or WPMU permalink ?

wordpress mu logo This days a lot of users of this website send this question to me and I will try to describe solution.

Question 1 : Why this problem appear ?
There are two problems – sometimes it is server problem and .htaccess file is not changed from apache server and user must do this manually.
But in most of cases it is human mistake. What is happening ?

Webmaster wanted to put : /%category%/%postname%/ and by mistake he put : /category/%postname%/ for example. This bug will create problem for your WordPress or WPMU site.

Solution for WordPress :
Go in settings, set Permalinks to default (no pretty permalinks). Go to server, delete .htaccess file and create new one and upload to server with :

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

if you have WordPress in subdirectory put instead RewriteRule . /index.php [L] put : RewriteRule . /subdirectory /index.php [L].

Then go to Settings/permalink and set to wished permalink.

Solution for WPMU :
If you made mistake, and forget % in permalink structure and now you are getting index.php in permalink URL – solution is only one.
You can not fix that in Setting/Permalink. don’t fix there anything.

First go to .htaccess file and check is it like this :

RewriteEngine On
RewriteBase /your_sub_folder/

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]



SecFilterEngine Off
SecFilterScanPOST Off

If it is then go to :
Super Admin / Sites and find blog in which you made mistake and where you are getting index.php in permalink.
Click EDIT for that blog (same things for multiple blogs – you must repeair blog by blog) and find :
PERMALINK URL : and here you paste wisher permalink for example : /%postname%/.

Now go to : Settings/Permalinks and you will see that you fix permalink structure and index.php is present anymore.
You can test site now.

If you have better solution for WPMU please write in comment !




Related Posts

  1. SQL CREATE INDEX – SQL tutorial
  2. SQL Index – SQL tutorial
  3. WPMU DEV SEO WordPress Plugin – full review and download
  4. Remove Email Verification From Signup WordPress plugin
  5. How to fix WordPress WPMU – There doesn’t seem to be a wp-config.php file -
  6. How to protect wordpress blog from hotlinking – protect bandwidth – tips and plugins
  7. How to install wordpress in localhost under Windows XP or Vista using Xampp – text and video tutorial
  8. How to solve WordPress php problem – Fatal error: Allowed memory size
  9. How to speed up WordPress website – top 17 tips for better SEO
  10. WordPress Dashboard on your Mac – first MAMP
  11. How to Change the Post Attribution at WordPress
  12. How to Erase Spam Comments in a Second at WordPress
  13. How to install wordpress at shared hosting using Cpanel

Trackbacks

  1. [...] How to remove index.php from WordPress or WPMU permalink ? [...]

Speak Your Mind

*


*