I am using Open cart 3.0.2.0.
Our main site using CodeIgniter and .htaccess and now I have moved my OC site to shop folder under public_html.
Later on, I am looking to move permanently to access shop with the main URL.
Example :
Current website: https://www.mywebsite.com/
The new website ( OC ) :https://www.mywebsite.com/shop/
In, future it needs to point from shop but it will show only the domain current website instead shop
.htaccess ( under public_html )
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
.htaccess ( under public_html/shop )
Code: Select all
# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mywebsite.com [NC]
RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [L,R=301,NC]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /shop/
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)
RewriteCond %{REQUEST_URI} !(shop|shop|shop)\/.*
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Thanks in advance!