redirects not working
agjs opened this issue · 2 comments
We are hosting our company website using Jekyll on S3, using cloudfront as our CDN.
Due to the nature of Jekyll and the structure it creates e.g. /about/index.html, I'm trying to create meta redirects so for example when you come to /about/ ---> /about, which means that instead of serving index.html from the about folder, we are serving about object from the root of S3.
Example:
redirects:
is/index.html: /is
education/index.html: /education
For instance, when users comes to /education/, I want them be redirected to education object in the root of the directory and for some reason, s3_website gem is not adding meta-data to the index.html files at all.
What I expect to happen is:
about/index.html ---> this guy gets the redirect meta data to about
When I inspect the file in s3 file explorer, meta data is not there.
Am I doing something wrong or is this a known bug ?
Thanks in advance,
Alex
Hi Alex, do you have the file is/index.html
on your website? If yes, that probably conflicts with the redirect rule. Consequently, the redirect metadata is not applied to the object. Please correct me if I'm wrong.
Yes sir, the folder is indeed there. Should I remove those folders and let the gem create those files automatically ? I believe I also tried with the files which do not have the folder. Do I need to wait till the website is fully re-cached for this to take place ?