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-url/ https://domain.com/new-url.htm
Redirect 301 /another-url/ https://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=$7 [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.