Status
Not open for further replies.

FancyPants

Active Member
1,265
2009
2
0
I have two indexes in the same folder. one is .html and the other is .php.
How can i make it load up the html as a default when my website is visited? I dont have access to the apache conf so i was wondering how can I do it in .htaccess. Also i want to hide the extension on index .html, what will the mod_rewrite line be?
 
1 comment
1:
Code:
DirectoryIndex index.html
I'm assuming the name of the html file you want default is index.html, if not just change that.

2:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
change the .html for any file extension you want,
btw that's not my own code, can't remember where I got it from it's just what ive been using for a while
 
Status
Not open for further replies.
Back
Top