Page Rule for index in a directory

Hey folks,

Just want to confirm an assumption I have about page rules. Let’s say I have the following directory

www.exmaple.com/foo

And I want to be able to 301 all traffic to /foo and specifically /foo/index.html to another url. I’m assuming my forwarding rule to handle this will be simple: www.example.com/foo — is that correct?

Additionally, let’s say I want to make sure that /foo/bar.html does NOT redirect. Will the above forwarding rule leave bar.html alone?

Thanks!

No, you need a wildcard, or specifically match. Since you specified index.html, the Page Rule should match: www.example.com/foo/index.html

Thank you. Follow up question. So if I have these two Page Rules:

www.example.com/foo
www.example.com/foo/index.html

And 301 traffic to www.another.com

Will users be able to hit www.example.com/foo/bar.html or will they be 301ed?

If each one does the 301, they need to be somewhat exact matches. I’m not sure if the first one will end up with a trailing slash or not, so I don’t know what it will do.

But if the question is if bar.html will redirect, then No, it will not match either of those Page Rules.