Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Different Directory Index Page in .htaccess

DZone's Guide to

Different Directory Index Page in .htaccess

·
Free Resource

We know that normally index.html or index.php is the default page for many servers, when visitor types a directory without specifying a file name. You can change this rule with .htaccess:

# Sample 1: 
DirectoryIndex index2.html
 
# Sample 2: 
DirectoryIndex index2.php
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}