-2

I am using this code to remove index.php for opencart. However, there are other addresses:

/index.php?route=account/register

Of course the code starts to delete index.php everywhere. My goal is to remove it (index.php) for SEO because of duplicate content.

I use this

Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://website.com/$1 [R=301,L]
Shegit Brahm
  • 153
  • 4
  • 11
  • This question appears to be off-topic because it is about **SEO** which is off-topic at Stack Overflow. Please read ["Which SEO questions should be closed as non-programming/non-admin?"](//meta.stackoverflow.com/a/382618) to better understand when SEO questions are acceptable to ask here (most are not) and where you might be able to get assistance. – John Conde Mar 17 '20 at 16:37
  • What actually is the question here? Are you getting an error or incorrect redirect with your directives? (Have you removed `index.php` from the URLs in your HTML source?) – MrWhite Mar 17 '20 at 21:41

1 Answers1

0

To use SEO URLs, apache module mod-rewrite must be installed and you need to rename the htaccess.txt to .htaccess.

Then inside Opencart's admin go to System > Settings > Edit Store > Settings > Server > Use SEO URLs > YES.

kanenas
  • 869
  • 1
  • 20
  • 37