View Single Post
  #1  
Old 11-24-2015, 04:59 PM
 
ant99 ant99 is offline
 

Advanced Member
  
Join Date: Mar 2015
Posts: 39
 

Exclamation 301 Redirect not working in HTACCESS file

We have a list of 301 redirects in the .htaccess file. They are simple rules written one on each line as so:

PHP Code:
Redirect 301 /old-urlhttps://domain.com/new-url.htm
Redirect 301 /another-urlhttps://domain.com/destination/ 

These URLs are resolving like this and returning a 404 Page Not Found error:
Code:
https://domain.com/new-url.htm?url=old-url&last=&rest=&ext= https://domain.com/destination/?url=another-url&last=&rest=&ext=

They seem to be redirecting properly and the final URL would be fine if the page wasn't 404'd. It looks like there is a rule in x-carts .htaccess file that appends a string to the URL if a certain file or directory does not exist from the URL.

PHP Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)(/?)(\.([_a-z0-9-]+))?$ cart.php?url=$5&last=$4&rest=$3&ext=$[NC,L,QSA

What is the purpose of this rewrite? More importantly, how can I make the 301 Redirect rules work properly? Should I be trying a different route? Please help as this is urgent. Any insight is much appreciated. Thanks in advance.
__________________
Ant

XC v5.3.1.8
Horizontal Flyout Categories Menu Module
CloudSearch / CloudFilters

XC v4.7.6
CloudSearch
Reply With Quote