Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

Pressing "update Mod_Rewrite Rules" not consistent with the message #25536

Open talgalili opened 7 years ago

talgalili commented 7 years ago

I am using the expert option, and I see the following text:

When Expert cache delivery is enabled a file called .htaccess is modified. It should probably be in the same directory as your wp-config.php. This file has special rules that serve the cached files very quickly to visitors without ever executing PHP. The .htaccess file can be updated automatically, but if that fails, the rules will be displayed here and it can be edited by you. You will not need to update the rules unless a warning shows here.

So it appears I don't need to do anything. Nevertheless I press "update Mod_Rewrite Rules", and then I get this message:

Mod Rewrite rules must be updated!

The plugin could not update /home/rstatis/public_html/.htaccess file: Page test failed as pages did not match with new .htaccess rules. Enable debug log on Debugging page for further details and try again. The new rules go above the regular WordPress rules as shown in the code below:

When I go to the .htaccess file I can see the code there (for some reason, on my server it can't update the files directly, so I have to do it manually. So it is clear the script can't do the update, but it should also recognize that the code is already there).

See also issue Automattic/jetpack#25538 and issue Automattic/jetpack#25537 that are related.

Thanks.

donnchawp commented 7 years ago

When you see the "must be updated" message does it show you the rules it must add? Are they different to the rules in the .htaccess file?

talgalili commented 7 years ago

Hi @donnchawp It does show me the rules (in green), and they are identical to what I copy pasted into the htaccess manually.

antermoia commented 4 months ago

Hello, sorry for the lame "me too" but I'm seeing this exact issue as I'm trying WP SuperCache on one of my sites: the warning that I need to update .htaccess manually persists, even after I have added the necessary modifications.

If it's of any use, my site is behind CloudFlare (I did enable "develop mode" though for this, to circumvent their caching temporarily) and the server I'm on is running LiteSpeed web server (Apache compatible).