February 19th, 2007

How to set an iframe to 100% height in FireFox

Here's the HTML code to implement if you'd like to embed another web page in an iframe on your web site, but would like it to appear as the entire page. This makes it hard to detect that the page is within an iframe. It's easy to do in IE, just set the iframe height and width to 100%. But this is invalid markup and won't work in FireFox. Here's the code to make it work, with CSS.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
 <head>
  <title>iframe example</title>
  <style type="text/css">
   html, body, div, iframe { margin:0; padding:0; height:100%; }
   iframe { display:block; width:100%; border:none; }
  </style>
 </head>
 <body>
  <div>
   <iframe src="http://example.org/" height="100%" width="100%">
    <p><a href="http://example.org/">example.org</a></p>
   </iframe>
  </div>
 </body>
</html>
February 19th, 2007

How to track your cars with GPS

Imagine being able to keep track of all of the cars owned by your family or small business. No more worrying about locating stolen vehicles. No more worrying about your teenage son or daughter being in an accident or lost, and you not being able to locate them. This is pretty futuristic sounding, only because the idea of tracking every vehicle you own with GPS sounds outrageously expensive. (more…)

February 16th, 2007

How to link to PHP files without the .php extension

With a corporate or business-related website, there are several advantages to being able to remove the .php file extension from any links to PHP pages on your web server.
1. It looks much cleaner and professional to have yourdomain.com/products instead of yourdomain.com/products.php
2. It's much easier from coding perspective to be able to accomplish this with files, rather than having to create lots of sub-directories with index.php files.
3. It's easier to hide the server-side technology that you're using, to prevent hacker attacks.

So, if you add one of the following two code options to your .htaccess files, you can link to your files without the .php extension. For example, you could link to /products instead or /products.php

AddHandler server-parsed .php
SetHandler application/x-httpd-php
AddHandler application/x-httpd-php .php

OR

RewriteEngine On
RewriteRule ^[^.]+$ - [T=application/x-httpd-php,L]
February 14th, 2007

How to enable the "update now" button/link in awstats

With my first web host, I was able to re-generate my Awstats webstats on the fly, whenever I wanted, by clicking the 'update now' link at the top of the main page. However, when I switched hosts, I noticed that is was gone. I did some digging, and found out how to change the configuration file for Awstats to re-enable the 'update now' button.

Follow these steps:
1. login into cPanel
1a. Open File Manager
2. navigate to /home/username/tmp/awstats/
3. edit the .conf file (e.g. awstats.yourdomain.com.conf)
4. look for this line: AllowToUpdateStatsFromBrowser, set the value to 1 (AllowToUpdateStatsFromBrowser=1)
5. Save the .conf file. When you refresh your statistics page. you will get 'update now' link at the top of the page.

This applies for any subdomain as well.

February 14th, 2007

I would love an e-traffic jam for my sites!

First of all, I've got to say that this is a very original name for a Search Engine Optimization company: eTraffic Jams. (more…)

« Previous PageNext Page »