How remove ‘index.php’ from URL with .htaccess?

Hello Everyone!

If you want remove the index file name like index.php , index,html etc from the site url( then this post will be very helpful for solve your problem.

URL Before Changes :-


For that you have just need to add given code in your .htaccess file

RewriteRule ^(.*)index\.(htm|html|php)$ http://%{HTTP_HOST}/$1 [R=301,L]

URL After Changed :-


Enjoy Code!


Sr. Software Engineer

Tagged with: ,
Posted in Drupal, Joomla, PHP, Wordpress
5 comments on “How remove ‘index.php’ from URL with .htaccess?
  1. Nathan Hawks says:

    Some of your text is showing up beside your pictures, making it easy to miss parts of your post. Ditch the float:left and you’ll be good to go.

  2. Have you ever considered publishing an ebook or guest authoring on other sites?
    I have a blog based on the same information you discuss and would love to have you share some stories/information.
    I know my readers would enjoy your work. If you
    are even remotely interested, feel free to send me an email.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Recent Posts
%d bloggers like this: