remove “index.php” from permalinks

I have been trying to find a solution. but I can’t..

my links are all domain.com/index.php/post_name/

I really want to remove /index.php

I have searched and found some… saying I need to add these.. but it’s not working ..

# 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

I am using 3.5.2 wp.

Please let me know if you know anything about it.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Go to your WP-ADMIN–>Settings–>Permalink and use the permalink structure change there, if it generate any .htaccess file copy the content and update your .htaccess file.

Or Check if your hosting mod_rewrite is enable by creating a file phpinfo.php with content,

<?php phpinfo();?>

Upload this file and browse via Browser. So you know which modules are enabled. You need mod_rewrite enable to remove index.php from URL.

More details Check this link

Method 2

Had exactly same issue. But in my case mod_rewrite was not installed at all for apache. I just installed it with

sudo a2enmod rewrite

and then changed my Permalink Settings. Worked like a charm.

Hope it helps.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x