apokaliptis
apokaliptis

Reputation: 479

Using index.html in their own folder for each page to get clean URLs

I was wondering if their was anything wrong with making each webpage as an index.html in its own folder to achieve clean URLs. You just link to the directory and the index.html is automatically served without a mod_rewrite. For example instead of having:

 .
 |-about.html     url: example.com/about.html
 |-contact.html   url: example.com/contact.html
 |-index.html     url: example.com

you could have:

 .
 |-about
 |    \-index.html   url: example.com/about/
 |-contact
 |    \-index.html   url: example.com/contact/
 |-index.html        url: example.com/

I couldn't find any good search results about this. Is their any problems with doing something like this that I haven't foreseen? What about SEO?

Upvotes: 1

Views: 410

Answers (2)

Tony Tai Nguyen
Tony Tai Nguyen

Reputation: 1633

It's easier to crawl a clean URL.

When Google crawls your internal links, it will result in 404 error page as shown below.

http://www.sample.com/xyz.html/category/abc.html

With the use of absolute links, you are avoiding this type of situation.

IE: http://www.sample.com/xyz

Upvotes: 0

splinterteal
splinterteal

Reputation: 139

it's easier to create domain.com/contact.html and truncate .html with .htaccess file so your URL would be domain.com/contact - no need to create folders

Upvotes: 1

Related Questions