skip to Main Content

I have enabled seo url in opencart settings. I have also return .htaccess file. But still index.php in coming at the end of the home page. Once I click on the home page it comes blank untill I write index.php after the DNS. Please if any one can help me where I am going wrong with the things.

RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

I have checked number of links but not getting the correct output. Still the home page is blank. Please help me

2

Answers


  1. To remove index.php, you can do replace in this file

    /catalog/controller/common/seo_url.php

    Find:

    return $link;
    

    Before it on a new line put:

    $link = str_replace('index.php?route=common/home', '', $link);
    

    Edit If you want full SEO just use this line instead of the above:

    $link = str_replace('index.php?route=', '', $link);
    

    Also make sure SEO URLs is turned on in the Admin panel of the store.

    Related:

    Login or Signup to reply.
  2. The problem you are facing is weird and I am unable to help you just fix it because I don’t have much detail.

    I think, first of all you should check your error logs, if there are any new errors share them here.

    I think, home page may have some kind of errors when you visit without index.php in URL. Because of those errors site won’t may be working correctly & showing the blank page on your home page. Enable the Error Display & check if there are any errors displayed then post the errors here.

    How do I get PHP errors to display?

    Cheers.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search