My client don't want home page accessible if someone type www.domain.com/index.php.

He only want home page accessible by domain name only(without index.php). He thought it is affecting the site SEO

Is it possible? Please suggest guys.

Thanks in advance


Right after

    RewriteRule .* index.php [L]

Put this in your .htaccess file

    RewriteRule ^index\.php/(.+)$ /$1 [R,L]
    RewriteRule ^index\.php/?$ / [R,L]

[UPDATE]Or this:

    RedirectMatch 301 index.php/(.*) /$1

Must be before:


Ofcourse... You have to edit ".htaccess" (or a file like that) for it.

You have to ask your system administrator or Google: ".htaccess redirect".

  • Thanks for the reply, so after doing ".htaccess redirect" site will be not accessible from typing /index.php (www.domain.com/index.php)
    – manish
    Sep 16 '15 at 10:44

Go to system -> configuration and enable seo friendly urls .

index.php will be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.