Home
Support Forums

Netifly Redirect within same root folder in subfolders

https://alexdelgadillo.dev

html on different folders like this:

Folder:

   index.html
   startup  <--This one is another folder

Then on startup folder I have another index.html I´m using the netlify.toml like this:

[[redirects]]
  from = "/"
  to = "/startup/"
  status = 301
 force = true

This file is on my main folder

This is the startup folder:
image

I don´t know if I have to put anything over here

When I open the index.html on chrome and go to the other index everything is working is just on the site that doesn´t works

I’m assuming your problem is that, that rule is not working. You need force = true line to make it work.

Already tried that and not working also :frowning:

Do you have the link to the deploy in which you tried with force? The latest 2 deploys don’t have force enabled.

Sorry to be a complete newbie here, but how do I deply with force enabled?
This is the latest one:
https://60d35a8fbd8cd56158e0875b--frosty-lichterman-9f9e5d.netlify.app/

When you add force = true to a redirect block, that does what I’m saying. In the code snippet above, you’ve added it, but I don’t see it deployed in the website. The redirect rules that I’m seeing are all non-forced.

You’ve added the spelling of force wrong in these:

Moreover, you’ve added the same rules. So, only the first rule would work, rest are ignored.

2 Likes

Oh right, that was one issue I had forece instead of force
And the other one was on js.
I had something like this
src"…/rootfolder/startup/index.html" ← That gave me no error on chorme but on the site it does so instead of writing the full path I wrote it like this:
src"…/startup/index.html"

Now it´s working, thank you! Lesson learnt

1 Like