rapture89
rapture89

Reputation: 135

index.html not set as default in subdomain

I've created a subdomain such as sub.website.co.uk

However it's not resolving at the index.html - I'm aware I need to add some code to a htaccess file.

One thing I'm not sure of is does the htaccess file go in the root of the domain or inside the subdomain folder?

I've tried the following:

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^sub/index\.html 

Note: if i go to sub.domain.co.uk/index.html it works just isn't automatically resolving when I go to sub.domain.co.uk

Upvotes: 1

Views: 3088

Answers (1)

I wrestled a bear once.
I wrestled a bear once.

Reputation: 23379

.htaccess can go in any directory you want and it will effect all subdirectories recursively.

You could put them in all of your directories if you wanted to.

You can add the following line to your .htaccess (in the directory of your subdomain):

DirectoryIndex index.html

That will fix your problem.

Upvotes: 2

Related Questions