WordPress behind HAproxy

I found your post by looking for a fix similar, I have haproxy set up and I’m trying to install wordpress on a backend server as well. I found this page: https://www.wpbeginner.com/plugins/how-to-fix-the-mixed-content-error-in-wordpress-step-by-step/ that details some HTTPS settings you can change in the wordpress settings that should fix it. For haproxy looking at your config you … Read more

How to watermark wordpress images from wp-content/uploads folder with htaccess and php?

The rewrite condition !-f means “if file does not exist”. Since the files exist, the rule is never reached. Just changing the order should fix the problem. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-content/uploads/(.*\.(jpe?g|gif|png))$ watermark.php?p=br&q=90&src=wp-content/uploads/$1 [L] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

ouput buffering confusing me!

the_content(), output of which you are filtering, is a template tag. It’s meant to be used as part of HTML page. One page load cannot simultaneously be HTML page and PDF download. File download you are generating needs to happen before HTML template is loaded, for example on template_redirect hook and exit after so that … Read more