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
  • Web Site Promotion Through Directories When I first started building web sites I seemed to have very good "google luck". I designed pages, published and then submitted to 4-5 search engines and a couple directories and the traffic started coming in. The search engines were altavista, google, hotbot and a couple others and the directories......
  • Using .htaccess to ALLOW directory browsing By default the apache install for most sites now restricts directory browsing. It's a good idea, you don't want just ANYTHING to be browsable on a web server, but there comes a time that it makes life easier for a directory (or tree of directories) to be browsable without having......
  • 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
  • ECommerce Internet Site Hosting - Defining Your Requirements The blueprint project reviewWhen you are setting up a web based business selling items or services from your web site you may require eCommerce website hosting. An on-line enterprise has some added requirements but the usual criteria for choosing a hosting service are still relevant, in fact they're of greater......
  • Astonishing Tricks Of A Small Recognised Targeted Visitors Generation Grasp Traffic Bandits ReviewSo, you have create your foremost site while in the hope which you could appeal to far more visitors in your home business. You have worked some months setting up, creating, developing and having to pay to get a wonderful world-wide-web host. All that stays to become accomplished......
  • SEO Principles for WordPress Blogs WordPress is a relatively SEO friendly blogging tool to begin with. It offers a linking structure that makes it relatively easy for spiders to crawl your pages, and the code contains very little validation errors if any at all. However, there are a few additional steps that you can follow......
PDF24    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