Back to Top
WJunction

Register Now

Welcome Guest!  Register  
Go Back   WJunction - Webmaster Forum > Hosting > Server Management Help

Post Reply
 
Thread Tools Display Modes

Old 16th Dec 2010, 02:44 AM   #1
Member
 
  • My Statistics
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?
FancyPants is offline   Quote
Old 16th Dec 2010, 02:56 AM   #2
Member
 
Website(s):
Doxsters.net
  • My Statistics
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
timtamboy63 is offline   Reply
Post Reply

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with .htaccess woja vBulletin 1 25th Jan 2011 10:11 PM
.htaccess help.! vorazeal Webmaster Discussion 1 25th Dec 2010 04:59 PM
Htaccess Ambition General Discussion 3 5th Oct 2010 11:24 AM
.htaccess help Nemesis Webmaster Discussion 1 21st Mar 2010 07:13 PM
.htaccess Help ICanSurfNow Technical Help Desk Support 14 19th Feb 2010 09:18 AM


All times are GMT. The time now is 08:24 AM.