Saving you from yourself or specifying which index file to use with apache



As I said, I mistakenly uploaded a page of links that I use for the main administration across many sites to this domain. Unfortunately, the server preferred using the index.html to the index.php that serves up the USUAL home page. So, for about an hour after my slipup…. the main page for this site showed a page full of links to admin logins/stat monitors, google utilities, etc. etc. (At least I’m not dumb enough to have put in password information.) Anyway…. I thought, how should I protect myself from doing that again? .htaccess is the answer….


Apache has a number of configuration options and many can be specified or over-ridden from your .htaccess file in the folder you want to affect. In this case, here’s what I added….

DirectoryIndex index.php index.html

(Because I ALWAYS want the index.php to take priority over the index.html)….

Now, if only I can make that USB hand that slaps you everytime you do something stupid I’ll be all set. (Seriously, 5v USB power might be enough to use one of those “wavy” hands you used to see in the back of car windows give a spasmic swat towards the hand at the mouse button…. maybe use some sort of motion sensor? or tie it in with the message bus to trigger…. oh nevermind…)

Related Posts

Blog Traffic Exchange Related Posts
  • Search Engines Submission This is what hopefully will be the begining of a series of threads on webhosting, web marketing, etc. The first topic up is search engines submission. (This may take several articles...) It's important to get your web site up and mostly fleshed out before submitting to search engines. Why? Although......
  • More details on php exploit from last week Ok. I have a bit of time that I can sit down and get a little more detailed on what specifically happened late last week that shut the site down for a couple days. At one point, I had updated the ezcontents script for the main site (averyjparker.com), but I......
  • Custom Error Pages with .htaccess Ok, we've looked at controlling access to directories with .htaccess, but there are other neat tricks we can do that can add a bit of polish to your site. One that I've implemented lately is a custom error page. Now, we've all done this, clicked on a link and get......
Blog Traffic Exchange Related Websites
  • Free Vs Paid Web Hosting Options Everyone likes to get something for free. But as the existence of spam shows, free isn't always good. Sometimes, it's downright harmful. Deciding whether it's worth the cost to pay for hosting involves a number of complex considerations.Hosting companies that offer free services obviously can't stay in business from the......
  • Find out What it Takes to Identify a Good Web Hosting Service Selecting the correct web host can either make your website wonderful or horrible.This is because the hosting service that backs up your website acts as its backbone. In order to have long term stability and to ensure you give your site visitors a good experience on your website, you will......
  • Choosing Out A Web Hosting Support That Delivers Selecting the best internet host can make or break your web site. That is because the net host need to be regarded as to be the foundation of the web site. In order to possess a longer term web site and make sure you present a good knowledge for your......
www.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site