$request_uri Query Strings Being Stripped

I’m trying to redirect one domain to another and for specific URLs, the redirect breaks:

oldsite/a/.js?foo    ==>    newsite/a/.js    (doesn't work)
oldsite/a/.abc?foo    ==>    newsite/a/.abc?foo    (works)
oldsite/.js?foo    ==>    newsite/.js?foo    (works)

Now it’s not just for .js, it could be other extensions like .css or .jpg.

Besides for a couple of includes for HSTS and Let’s Encrypt, the config file looks like:

location / { return 301 https://example.com$request_uri; }

I spun up a VM with just NGINX and the redirects all work.

I suspect there’s something in Hestia’s config that’s affecting $request_uri for certain extensions. But I haven’t a clue what it is.

Can anyone help me pinpoint what’s causing this?

I’m running Hestia v1.3.3 and NGINX v1.19.7.

Thank you.

Hi @bluemarble

Thanks for the detailed report about your issue. What I can say is that hestia uses a lot of “default” software like apache2, nginx, etc. and combines it with a few optimizations and the panel itself ofc.

For your case, probaly something in /etc/nginx/nginx.conf could be what you’re searching. I dont had the issue here, so I’m not sure what could cause it.

Wow, I think I narrowed it down. It wasn’t NGINX. It was Cloudflare.

Once I turn off proxying for this domain, all query strings are passed.


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.