Support » Plugin: Images to WebP » Writing to the .htaccess file in the wrong place, tested on 2 hosting

  • Resolved max3w

    (@max3w)


    Hello, the problem of incorrect writing .htaccess file, tested on 2 hosting, see attached picture. Adding code manually above # BEGIN WordPress also does not solve the problem, the plugin re-writes the code block to .htaccess inside # BEGIN
    WP 5.6, plugin current Version: 1.7

    .htaccess

    • This topic was modified 1 year ago by max3w.
    • This topic was modified 1 year ago by max3w.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author kubiq

    (@kubiq)

    That’s ok, that’s exactly how it should work 😉
    I’m using WP functions to write .htaccess and they do it this way

    Dj Tribunus

    (@djtribunus)

    I have the same problem, how did you solve it?

    Thread Starter max3w

    (@max3w)

    Yes, but the plugin cannot be activated, I constantly see the inscription http://joxi.ru/5mdMYDRI3DaD92
    Although it adds the code, it is not activated.
    Let me remind you the code added by the plugin http://joxi.net/KAgGownFEQKgwA
    Why doesn’t he see it and is not activated?

    • This reply was modified 1 year ago by max3w.
    Plugin Author kubiq

    (@kubiq)

    Then your hosting simply doesn’t support WebP, so even if you have this code there, it will not work.
    It’s not because of my plugin, but because of your hosting, so you have to contact your server provider.

    Thread Starter max3w

    (@max3w)

    Tell me what exactly should be enabled for the plugin to work? I have enabled Imagick on hosting, here is a screenshot of Imagick block in phpinfo http://joxi.ru/bmoVzlNf3DOedr or https://sto-drayv.com.ua/info.php

    • This reply was modified 1 year ago by max3w.
    Plugin Author kubiq

    (@kubiq)

    Hm, your phpinfo looks good, so i have no idea what’s the problem.
    Please create new request on our support forum
    support.kubiq.sk

    Thread Starter max3w

    (@max3w)

    All extensions that should be processed by the .htaccess file should be removed from the static ones on the hosting in the Static files window. I deleted static files in Apache hosting settings: jpg, jpeg, png, gif, webp. http://joxi.ru/Q2K7YwXsLYgkD2
    I waited 15 minutes until the hosting settings are updated and the plugin is activated. Thank you

    Thread Starter max3w

    (@max3w)

    The hosting works in such a way that it removes the caching rules if the images are removed from the statics, therefore, in addition, added caching lines to the .httaccess:

    ExpiresActive On
     ExpiresByType image/x-icon "access plus 365 days"
     ExpiresByType image/jpeg "access plus 365 days"
     ExpiresByType image/png "access plus 365 days"
     ExpiresByType image/gif "access plus 365 days"
     ExpiresByType image/webp "access plus 365 days"

    And everything works great

    • This reply was modified 1 year ago by max3w.
    Plugin Author kubiq

    (@kubiq)

    Wow, I’ve never heard about this problem, not even about these Static files 😮
    Thank you for sharing information 😉
    Maybe it will help also someone else

    P.S.: I’ve tested this plugin on 6 different hosts in Slovakia, Czech, Switzerland, Finland on both Apache and Nginx and I’ve never experienced this

    Thread Starter max3w

    (@max3w)

    Today I also solved the problem on the second hosting – I wrote in support they turned off the transfer of images to NginX.

    Support response: “By default, the NginX web service is responsible for serving static content.
    If you want to use Apache2 to serve jpg | jpeg | gif | png files, then give us the name of the site and we will disable processing on the NginX side for these files. ”

    This is in Ukraine. Two large hosting. The sites run on Apache, but some files turned out to be transferred to NginX for speedup. And then the httacces rules are simply ignored by the hoster.

    Thanks for the plugin.

    Plugin Author kubiq

    (@kubiq)

    Thanks,
    if there will be more people with similar problem, then I will add this to my FAQ 😉

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Writing to the .htaccess file in the wrong place, tested on 2 hosting’ is closed to new replies.