Talking about this well known solution:
I’m looking for a straightforward way working also on a Nginx installed WP and not only on Apache ones.
Is there any other code-based approach you would recommend, that
works fine on any server environment?
So far, after testing various plugins from the official repository on a Nginx installed WP website, I also discovered that a bunch of them just fail when the web server is not accepting htaccess rules.
In my opinion, the best would be using the same approach for both:
setting a htaccess / nginx web server rule controlling any file request made toward a specific /uploads subfolder. The rule I found working well on my Apache based WP is the following:
I found – almost – the same rule for a Nginx environment, but despite my tests I’m still not able to make it work on a subfolder, so the following is just for the whole /uploads folder, not recommended:
Furthermore, as long as many clients of mines have their installations on a shared hosting, asking the provider to set a nginx rule for a single website is a lost cause most of the times.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com