View Single Post
  #3  
Old 08-18-2016, 03:45 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default 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:
RewriteCond %{HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

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
Reply With Quote