Multiple directories containing index.html. How can I change that?

Hi, My SEO team is having me create directories for certain keywords, like /affordable-meal-delivery/, so that the URL is

The only way I know to do this is to create the directory and then have an index.html inside the directory. But I don't like having so many pages called index.html, for one thing I am afraid of overwriting one to another.

This site is able to do it without an index.html:  - if I add index.html to that, it goes to a page not found.

We are on an Apache server. So it looks to me like this:

But I have ten or so of those directories with an index.html in each. How can I do this without the index.html. Ideally, I would want the page inside the directory to be affordable-meal-delivery.html. Can I use an htaccess file to do this?

Melody ScottAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
What do you want to display on those pages?

The usual practice is to use URL rewriting (.htaccess) to the tell Apache where it must get the actual content from (rather than the physical path) but to answer this I would like to know what is it that you want to show when those URL's are requested?
Melody ScottAuthor Commented:
Here's an example. The page is an index.html. https://www dot

obviously replace dot with ., I just don't want to leave a link here. Thanks.
Julian HansenCommented:
I just don't want to leave a link here. Thanks.
If you don't want the question to be spidered by search engines you can make it a private question.

I am trying to understand what you would like to do instead?

The content has to come from somewhere - if not a page then a database / framework of some kind?

What is the ideal structure you would like for this?
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Melody ScottAuthor Commented:
I would like the structure to be /affordable-meal-delivery/affordable-meal-delivery.html, but have the url be

Does that make sense? Directory affordable-meal-delivery  and file affordable-meal-delivery.html, but the url as is.
Julian HansenCommented:
Then you would use a URL rewrite - you would rewrite the URL from the Virtual to the Actual in your .htaccess file.

Are you currently using a .htaccess?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Melody ScottAuthor Commented:
I use one in the root, I assume this would be in the individual directories?
David Johnson, CD, MVPOwnerCommented:
the link you provided gives you a 404 on index.html since they use index.php
Melody ScottAuthor Commented:
Thanks, everyone.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.