Post by ggrant3 » Mon Sep 08, 2025 6:54 am

I had a very old site (before I started opencart) and all of the files were in the root folder.

When I started opencart I decided to put the store in the /store subdirectory, just because, and I used my htaccess file (in the root) to redirect those old url's to the new location in the /store subdirectory (example:

Code: Select all

Redirect 301 "/product1" http://www.xyz.com/store/newproduct1
)

Now I have upgraded from OC 1.5.5.1 to OC 3.0.4.1 and I have a few pages that have differnt url's than the old OC (1.5.5.1) version

My question is, does it matter which htaccess file I use for redirect's? Do I use the root htaccess file for those old files, will that htaccess file in the root work for the /store redirects too? Or do /store specific 301 redirect's need to be in the /store htaccess file?

New member

Posts

Joined
Fri May 02, 2014 10:52 pm

Post by by mona » Mon Sep 08, 2025 3:27 pm

Answered most that that here =>
viewtopic.php?t=236035#p881089

same htaccess file but not clear what the "root" is the root should be the store root - so if you put it in a sub directory then a sub directory - but then from your previous post you are not redirecting from the root of the old site to a subdirectory in your code.

ie - you still need to redirect FROM https://myold.com site TO https://subdirectory.mynewsite.ocm

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by johnp » Mon Sep 08, 2025 9:25 pm

ggrant3 wrote:
Mon Sep 08, 2025 6:54 am
I had a very old site (before I started opencart) and all of the files were in the root folder.

When I started opencart I decided to put the store in the /store subdirectory, just because, and I used my htaccess file (in the root) to redirect those old url's to the new location in the /store subdirectory (example:

Code: Select all

Redirect 301 "/product1" http://www.xyz.com/store/newproduct1
)

Now I have upgraded from OC 1.5.5.1 to OC 3.0.4.1 and I have a few pages that have differnt url's than the old OC (1.5.5.1) version

My question is, does it matter which htaccess file I use for redirect's? Do I use the root htaccess file for those old files, will that htaccess file in the root work for the /store redirects too? Or do /store specific 301 redirect's need to be in the /store htaccess file?
Another option would be to move the Opencart store to the root and use a redirect extension.

https://www.opencart.com/index.php?rout ... search=301

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by khnaz35 » Mon Sep 08, 2025 10:36 pm

by mona wrote:
Mon Sep 08, 2025 3:27 pm
Answered most that that here =>
viewtopic.php?t=236035#p881089
Since the answers are already provided in the topic linked above, I would advise continuing the discussion there. In the meantime, I’ll be locking this thread.

Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy. :-*

Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 29 guests