• Resolved Amit Sonkhiya

    (@amitaits)


    Hi,

    When I Enable direct redirection to existing converted images then I come up with the message:

    It seems your server setup does not support headers in .htaccess. You should either fix this (install mod_headers) or deactivate the “Enable direct redirection to existing converted images?” option. Otherwise the Vary:Accept header will not be added and this can result in problems for users behind proxy servers (ie used in larger companies)

    However, my host has provided me rules to add to the .htaccess. What shall I do?

    <IfModule mod_setenvif.c>
      # Vary: Accept for all the requests to jpeg and png
      SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image
    </IfModule>
    <IfModule mod_rewrite.c>
      RewriteEngine On
      # Check if browser supports WebP images
      RewriteCond %{HTTP_ACCEPT} image/webp
      # Check if WebP replacement image exists
      RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
      # Serve WebP image instead
      RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp]
    </IfModule>
    <IfModule mod_headers.c>
      Header append Vary Accept env=REQUEST_image
    </IfModule>
    <IfModule mod_mime.c>
      AddType image/webp .webp
    </IfModule>
Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter Amit Sonkhiya

    (@amitaits)

    @roselldk

    Thanks for the deep support and efforts to rectify the issue.
    I’m on https://www.hostinger.in but request on .com should also respond.
    I’m using shared hosting with the premium plan.

    Do let me know if they offer you an account for testing purposes.

    Thanks

    Thread Starter Amit Sonkhiya

    (@amitaits)

    Hi,

    Di let me know if you reached to any helpful information regarding mod_header issue in Litespeed servers.

    Thanks

    Anonymous User 17638948

    (@anonymized-17638948)

    Hi,

    I am having the same problem:
    Unable to: Enable direct redirection to existing converted images
    So I am getting the error message—
    It seems your server setup does not support headers in .htaccess. You should either fix this (install mod_headers) or deactivate the “Enable direct redirection to existing converted images?” option. Otherwise the Vary:Accept header will not be added and this can result in problems for users behind proxy servers (ie used in larger companies).

    The host is from Hostinger.

    Have you found a very last solution?
    Or do I need to keep adding all your suggested codes to .htaccess files? Afraid to mess up something.

    Thank you for response.
    Sonata

    Anonymous User 17638948

    (@anonymized-17638948)

    Amit Sonkhiya , has this problem been fixed for you?

    Thread Starter Amit Sonkhiya

    (@amitaits)

    @sonatirt

    @roselldk is still working on it. Hostinger has Lite Speed servers and they offer customized configuration for Hosting so there might be an issue with this.

    • This reply was modified 4 years, 5 months ago by Amit Sonkhiya.
    SAAZ

    (@eyefashioned)

    Hello

    I am interested with your plugin and installed it on https://eyefashion.pk but see the error and my host support still saying that they are ok with their server configurations I hope you sort it out

    It seems your server setup does not support headers in .htaccess. You should either fix this (install mod_headers) or deactivate the “Enable direct redirection to existing converted images?” option. Otherwise the Vary:Accept header will not be added and this can result in problems for users behind proxy servers (ie used in larger companies)

    Awaiting

    Thread Starter Amit Sonkhiya

    (@amitaits)

    @roselldk

    I haven’t heard any progress regarding this issue from a quite long time. Would you please update?

    Thanks

    andrew

    (@urchindesign)

    Just wondering if there is any feedback on this? We are experiencing the same issue with a different Litespeed hosting set up.

    Plugin Author rosell.dk

    (@roselldk)

    Hopefully it has been solved now, thanks to @uryga.

    See here: https://wordpress.org/support/topic/error-mod_header-with-litespeed-enterprise/#post-12392822

    And here: https://github.com/rosell-dk/webp-express/pull/388

    This issue is btw a duplicate. It was first reported and discussed here: https://wordpress.org/support/topic/error-mod_header-with-litespeed-enterprise

    • This reply was modified 4 years, 2 months ago by rosell.dk.
    • This reply was modified 4 years, 2 months ago by rosell.dk.
    Plugin Author rosell.dk

    (@roselldk)

    Hi @amitaits and @urchindesign,

    Can you confirm if the latest release (0.17.3) did the trick?
    Thanks

    andrew

    (@urchindesign)

    This did not help for me. I have rerun the htaccess rules etc. but still have the same message:

    It seems your server setup does not support headers in .htaccess. You should either fix this (install mod_headers) or deactivate the “Enable direct redirection to existing converted images?” option. Otherwise the Vary:Accept header will not be added and this can result in problems for users behind proxy servers (ie used in larger companies)

    I have also spoken to support who confirmed the mod_headers is enabled.

    • This reply was modified 4 years, 2 months ago by andrew.
    Thread Starter Amit Sonkhiya

    (@amitaits)

    Hi @roselldk

    The version 0.17.3 fixed the issue for me. I can see vary: accept in header response as well as no error after updating the plugin, saving settings and forcing new .htaccess rules.

    The live test has also been passed. Thanks @uryga and you.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Regarding Enable direct redirection to existing converted images’ is closed to new replies.