X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   HTTP 410 Gone (https://forum.x-cart.com/showthread.php?t=75354)

happyscott 05-12-2017 06:17 AM

Re: 301 Redirect not working in HTACCESS file
 
can anyone tell me jow to do a 410 in x-cart 5 please?

thanks

scott

qualiteam 05-16-2017 02:56 AM

Re: 301 Redirect not working in HTACCESS file
 
Quote:

Originally Posted by happyscott
can anyone tell me jow to do a 410 in x-cart 5 please?


I'm sorry, what is "410"?

happyscott 05-16-2017 04:19 AM

Re: 301 Redirect not working in HTACCESS file
 
page removed/no longer available

scott

qualiteam 05-16-2017 04:36 AM

Re: 301 Redirect not working in HTACCESS file
 
Where do you want to respond with this HTTP status?
Please could you describe the desired behaviour in details?

happyscott 05-16-2017 05:27 AM

Re: 301 Redirect not working in HTACCESS file
 
The desired behaviour is user goes to web page which I have removed he then sees a 410 page.

Old style code used to be like this:

Redirect 410 /example.html

This does not work with x-cart 5

So I am guessing it needs to be something like the format here:


RewriteCond %{REQUEST_URI} ^/example.html$
RewriteRule ^.*$ 410page.html [R=410,L]

But I don't know

thanks

qualiteam 05-16-2017 11:53 PM

Re: HTTP 410 Gone
 
Do you mean responding with 410 Gone for products and categories that you removed? If so, a simple change in .htaccess is not enough, I think. You should track removed URLs inside X-Cart and respond with 410 from there.

Jon 05-17-2017 11:49 AM

Re: HTTP 410 Gone
 
Try one of these:

Code:

RedirectMatch gone /example.html

OR

Code:

# Make sure this is immediately following RewriteEngine On
RewriteRule ^example\.html$ - [G]


happyscott 05-18-2017 08:00 AM

Re: HTTP 410 Gone
 
Quote:

Originally Posted by qualiteam
Do you mean responding with 410 Gone for products and categories that you removed? If so, a simple change in .htaccess is not enough, I think. You should track removed URLs inside X-Cart and respond with 410 from there.


I do not know what you mean? items deleted inside the shop so url should already have gone? So I need to tell the search engines it will not be back?


All times are GMT -8. The time now is 03:58 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.