VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: behemoth on October 22, 2018, 16:15:09 PM

Title: HTTP response codes
Post by: behemoth on October 22, 2018, 16:15:09 PM
Hi All,

Not sure if this is the right place to put this - I searched, but I may have missed something obvious because I'm not very familiar with the topic.

I have a separate and unrelated application that from time to time needs to access images on my webserver that are used by my site. I want to be able to determine if they're present or not. In theory, I pass the full URL to the image, and get either the image or an HTTP 404 error code back.

With VM 404 handling enabled however, it's returning an error code of 200 (OK), so if my application is checking headers, I either get a 200 if the image is present or a 200 if the image is not present. You can see my problem...

For usability reasons, having the VM 404 handling is ideal; we'd much rather customers saw the homepage than an error. Is it possible to reconcile these two things? If so, how?

Cheers,
Ian

Title: Re: HTTP response codes
Post by: GJC Web Design on October 22, 2018, 16:31:24 PM
are u using VM3.4.2??

work has been done on this with a bit more to come in the next version .. 
Title: Re: HTTP response codes
Post by: behemoth on October 22, 2018, 16:42:29 PM
No - we've actually got multiple sites where this is an issue. They're on 3.2 (different subversions) and stuck in testing before we can upgrade to the latest version :D.
Title: Re: HTTP response codes
Post by: GJC Web Design on October 22, 2018, 16:44:44 PM
then use 3.4.2  .. the vm 404 has been over hauled  -- there are still some nurgles  .. a recursion problem   - see http://forum.virtuemart.net/index.php?topic=141213.0
Title: Re: HTTP response codes
Post by: PRO on November 02, 2018, 19:59:35 PM
you are requesting the image url? from outside of vmart?

why would vmart 404 return anything?

are you requesting the product page and then extracting the image from it?

better to create an empty view and select the image from parameter