Redirect rule is redirecting too much

Hey there, I wanted to redirect from url ending with slash to the url that does not. For example if https://example.onrender.com/about/ is accessed, i want to redirect it to …onrender.com/about (without the slash at the end).

I tried setting a new redirect rule as following

But when i try it (with and without the slach at the end), the browser says

This page isn’t working

example.onrender.com redirected you too many times.

Any idea why is this happening?

HI,

The current redirect rules for trailing slashes won’t work as expected for all cases.

However, there is a feature request for improved trailing slash handling on our feedback site. Please upvote/comment to be notified of any changes in the future.

Alan

Thanks Alan,

The reason I was trying to remove the trailing slash was the static website does not load static files (404 when trying to get js and images, not supported MIME type when loading css). What is the cause of it and how can i fix it the other way than removing the slashes?

A MIME type error usually means your request is hitting a 404 (text/html), rather than your asset, (text/css,text/javascript). It’s usually caused by an incorrectly referenced asset in your HTML.

Please could you share some specific details of the issue you are experiencing that may help us troubleshoot it with you, e.g. any logs/errors/output, specific URLs, reproduction steps, etc.

If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Help” or “Contact Support” links while logged into the Dashboard.

Alan

console

if I access aword - Home I get the errors on the picture above, and the static files wont load
But if i access the exact link without the slash at the end, everything works comepletely fine. I dont know if the error is on my end, I load the static files as following

NOTE: the second link (which is linked from another website, fontawesome.com) works, but not the files in my website’s folders

Appearantly i am linking the files wrong way or smt, because the browser is looking at …com/home/styles/home.css which is not the right path to the file, it is …com/styles/home.css
i tried linking them like this

(with ./) but it didnt resolve the issue

The first URL in your screenshot that 404s is:
https://aword.onrender.com/home/scripts/home.js

At a guess I tried it without the subfolder/home path, and it that returns a file:
https://aword.onrender.com/scripts/home.js

Same with https://aword.onrender.com/scripts/home-floating-letters.js

So you’ll need to check your asset references are correct in your code.

Alan

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