Subdomain with index.shtml as default page?

195 views Asked by At

Is there a way to use a .shtml as the default page for a subdomain? I need it this way as my site uses HTML includes. Possibly add something in the .htaccess?

2

There are 2 answers

0
Romeo Ninov On

You should add in your definition of virtual host this:

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

You can find more info in the apache documentation.

7
MrWhite On

I'm assuming server-side includes are already enabled on your server (which is what the other answer is addressing), otherwise your site wouldn't already be able to use "HTML includes" as you say it does.

To set a .shtml file (eg. index.shtml) as the default page for a subdomain then you'd set the appropriate DirectoryIndex in the .htaccess file in the root of the subdomain. For example:

DirectoryIndex index.shtml