How To Change Your Website’s Default Landing Page With HTACCESS

Have you ever wondered why when you type http://www.SOMESITE.com without typing http://www.SOMESITE.com/index.html the server knows that’s the page you wanted? It’s called the default page, the directory index page to be more precise, and it’s handled at the server level. I have no idea how it’s done on a Winder’s server but on Apache on Linux (the vast majority of websites) it’s handled in the .htaccess file.

The htaccess file controls a the flow of traffic inside of the webserver. You can learn more about it from Apache by reading their primer. All we’re concerned with for now is changing the default landing page. In this case we’re changing the default landing page of a subdirectory to be different than the default landing page of the web root directory. More specifically http://thekencook.com/web-development/ which is found in public_http/thekencook/web-development – did you follow that? Good!

There is an htaccess file in public_http and another in thekencook and yet another in web-development, which we want to change. You’ll see in the video how we did it and if you want to skip all the introduction and get right to the “how to change the default landing page with htaccess” then jump to 3:50 in the video. If you just want me to do it for you then HIRE ME 😉