| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
htaccess redirect for new directory structure and https | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
htaccess redirect for new directory structure and https
We're going live with the new x5 store soon and some of the URLs have changed so we need to set up 301 redirects.
We also want to make the entire store https. This also requires 301 redirects to avoid dropping pages in Google. I have the following. Will this make every request https and also redirect the categories? Code:
I'm not sure if the second line should be 301 as well to cover the categories that don't match the following rewrite rules.
__________________
Core version: 5.5.xx |
|||||||
#2
|
|||||||
|
|||||||
Re: htaccess redirect for new directory structure and https
If you want to make your life WAY easier, there is a re-direct module for XC5 that works really good.
__________________
X-Cart 5.4.1.39 Live PHP 7.4.33 5.5.5-10.3.38-MariaDB MariaDB Apache 2.4 CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT 32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1 |
|||||||
#3
|
|||||||
|
|||||||
Re: htaccess redirect for new directory structure and https
Thanks for the tip. We bought - http://market.x-cart.com/addons/redirects-by-Nova-Horizon.html
Here's their response, to a question I asked, for anyone looking at this.. The module uses an internal X-cart system, it does not modify .htaccess at all. All your entered redirects are stored in the database, and when X-cart tries to load an invalid page it checks to see if a redirect exists for that path. All redirects created are 301 redirects. My current thinking for the http to https part is to have this in htaccess as the first rule: Code:
So anything that's not https gets a permanent redirect and then after that has happened any other rules are run. We'll probably put some redirects in htaccess and then use the extension when we catch stray 404s showing.
__________________
Core version: 5.5.xx |
|||||||
|
|||
X-Cart forums © 2001-2020
|