New Topic
Results 1 to 2 of 2

Thread: .htaccess help

  1. FancyPants's Avatar
    • My Statistics
    16th Dec 2010, 03:44 AM
    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?

  2. timtamboy63's Avatar
    • My Website(s)
    • My Statistics
    16th Dec 2010, 03:56 AM
    DirectoryIndex index.html
    I'm assuming the name of the html file you want default is index.html, if not just change that.

    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

Similar Threads

  1. Help with .htaccess
    By woja in forum Web Application/Script Support - Archive
    Replies: 1
    Last Post: 25th Jan 2011, 11:11 PM
  2. .htaccess help.!
    By vorazeal in forum Webmaster Discussion - Archive
    Replies: 1
    Last Post: 25th Dec 2010, 05:59 PM
  3. Htaccess
    By Ambition in forum General Discussion - Archive
    Replies: 3
    Last Post: 5th Oct 2010, 11:24 AM
  4. .htaccess help
    By Nemesis in forum Webmaster Discussion - Archive
    Replies: 1
    Last Post: 21st Mar 2010, 07:13 PM
  5. .htaccess Help
    By ICanSurfNow in forum Technical Help Desk Support - Archive
    Replies: 14
    Last Post: 19th Feb 2010, 10:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts