Thanks for replying @samliew
The issue the OP is encountering on stackexchange is slightly different than what I am speaking about.
On stackexchange… OP has a folder named “portfolio” and a file off the root named portfolio.html.
His htaccess file removes the .html from the portfolio.html file name which results in “portfolio” in the URL.
An since there is already a folder named “portfolio”… apache interprets the call as a request to the folder.
So OP wants apache to recognize portfolio.html as /portfolio while still recognizing the folder /portfolio as /portfolio/
Notice the trailing slash on the folder name.
And…
The 1st solution provided - depending on your apache setup
- will create an infinite loop on the server… which will eventually kill the browser.
The 2nd solution provided simply does nothing except open the folder… and displays it’s content - (since there is no index page.
@cyberdave
Previously… on Webflow - you could create a page with the slug as “index”.
This would create a page called index.html.
So if you had a folder named “portfolio”… and a slug / page named “index.html”…
Why can’t they just use the same little trick they use for URL’s ?
By placing the ` character (it’s the symbol under tilda)…
- webflow would ignore whatever you put there.
In my case… index… which then exports as index.html
Removing this feature probably fixed an issue with the CMS
- but in removing this feature… it created a problem with exporting a site.
Several people here - including myself - have vocalized the need to reinstate this feature,
The OP in this post
http://forum.webflow.com/t/solved-folder-with-index-file-save-time-editing-the-html/27124
manually renames the file to index.html…
so portfolio.html would become index.html… this is a pain in the a$$ to constantly do with each and every export.
So for me… my fix was to create an index.html file that redirects to the correct webflow page.
So… www.domain.com/portfolio or www.domain.com/portfolio/ have an index.html file which then redirects to
www.domain.com/portfolio/portfolio.html.
This is not the best solution to fix an issue that webflow created.
The best solution is to reinstate the previous feature.