Redirect opencart site from .com to index.php

Avatar
  • Answered
My opencart website works fine when a user types in www.example.com/index.php but gives a blank page when www.example.com is typed in. My .htaccess looks like this # #ErrorDocument 404 http://example.com/index.php?route=information/information&information_id=10 # Options +FollowSymlinks Options -Indexes Order deny,allow Deny from all RewriteEngine On RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^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] RewriteCond %{THE_REQUEST} ^.*/index\.php$ RewriteCond %{REQUEST_METHOD} !^POST$ RewriteRule ^(.*)index.php$ / [R=301,L] RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC] Appreciate your help!
Avatar
johnpaulb-imhs1
Hello, Thank you for your question regarding a redirect and blank page. Since a blank page is often suppressing error messages, I recommend displaying/logging errors in OpenCart. Also, review your .htaccess file for conflicts or issues, since it is usually used in redirects. Thank you, John-Paul