Post by jjit.web » Mon Jun 25, 2018 11:56 pm

Hi All,

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]
Kindly let me know what need to do to access. I am looking not to disturb current website. Now I can not able to install OS with a new folder under public_html

Thanks in advance!

New member

Posts

Joined
Mon Mar 17, 2014 11:49 am

Post by rjcalifornia » Tue Jun 26, 2018 9:33 am

[;quote=jjit.web post_id=727467 time=1529942194 user_id=73487]
Hi All,

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]
Kindly let me know what need to do to access. I am looking not to disturb current website. Now I can not able to install OS with a new folder under public_html

Thanks in advance!
[/quote]

Right now you want to use both CodeIgniter and OpenCart, is that correct?

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by jjit.web » Tue Jun 26, 2018 2:04 pm

Yes , To use both CodeIgniter and OpenCart, is that correct?
Later on I need to point to shop.

New member

Posts

Joined
Mon Mar 17, 2014 11:49 am

Post by paulfeakins » Tue Jun 26, 2018 4:54 pm

It sounds like you need to get CodeIgniter's htaccess to ignore the /shop/ sub-folder.

This might help?
https://www.drupal.org/node/30334

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by jjit.web » Tue Jun 26, 2018 8:50 pm

Hi,
I tried but no Luck.
Image
Image
http://www.website.com/shop/admin/ - Above image
http://www.website.com/shop/ - It get redirect to home page http://www.website.com/

Let me know is there anyway

New member

Posts

Joined
Mon Mar 17, 2014 11:49 am

Post by straightlight » Tue Jun 26, 2018 9:15 pm

Posted screenshot links are invalid; empty screenshots provided.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jjit.web » Wed Jun 27, 2018 2:08 am

http://www.website.com/shop/admin/
http://www.website.com/shop/ - It get redirect to home page http://www.website.com/
http://www.website.com/ - Using codeigniter

My idea is to make both site active by shifting .htacess.
Let me know the rule to make active

New member

Posts

Joined
Mon Mar 17, 2014 11:49 am

Post by rjcalifornia » Fri Jun 29, 2018 1:19 pm

straightlight wrote:
Tue Jun 26, 2018 9:15 pm
Posted screenshot links are invalid; empty screenshots provided.

Code: Select all

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?:www\.)?example\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/shop/ [NC]
RewriteRule ^(.*)$ /shop/$1 [L]

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide
Who is online

Users browsing this forum: Google [Bot], niagato, Semrush [Bot], thomas_1989 and 627 guests