Varnish Error 503 VCL failed when url path ends with %

16 hours ago 2
ARTICLE AD BOX

My website gives a Error 503 VCL failed when url ends with %

I have tried to disable cache, and also tried redirect, in .htaccess but without success.

Here's my current .htaccess-configuration:

<IfModule mod_rewrite.c> RewriteEngine On # Redirect http to https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} # Avoid existing #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d # Disable Varnish cache and redirect everything Header add "Cache-Control" "no-cache" RewriteRule ^(.*)$ index.php [R=301,L,QSA,B] </IfModule>

Any requests to index.php that ends with %, for example:

index.php?test=%

ends up with the Varnish Error 503 VCL failed error. I have tried multiple variations of the RewriteRule in the.htaccess-file, but none is working. I have tried with and without the cache, with and without:

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

My goal here is not to actual handle the errornous %-requests, I just want to make sure such requests don't trigger the error. The error causes Google Search Console to refuse to index my website, because others (beyond my control) have posted such badly formated links to my website.

Read Entire Article