Managed Links Home Page
Using a .htaccess file
Site Map

If you don't want to rename your pages from .htm(l) to .php here is a trick you may want to use.

Apache, the most common webserver, recognises a special file called a .htaccess file. this file changes the way Apache works on a per directory basis.

To make Apache think all your web pages are .php pages even if they aren't then add the following to your .htaccess file

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

You may have noticed this page uses this trick.
If you look at the bottom you will see the Managed Links. Yet this page is a html page!

If you don't have a .htaccess file you may need to create one with your favourite text editor.

The file must be saved as ".htaccess" in the directory of your website where you want the HTML files to be read as PHP

That is the filename starts with a period "." and has the extension htaccess, no other parts or it won't be recognised.

Now create a HTML file to test it. save this to your server as phptest.htm and then load it in your browser

<?php echo ".htaccess file is working!"; ?>

Once this is done you can insert the PHP codes into your web page and all should be fine


  1. Some hosts do not allow the use of .htaccess files
  2. Some ftp clients cannot see the .htaccess file even though it is there (for cuteftp use remote filtering and -a as the filter)
  3. An error in your .htaccess file will cause a server error, so if you get a server error check the .htaccess file for simple errors
  4. Windows does not like creating a file without the filename part. so you can create it as say php.htaccess.txt save it to your webserver and then rename it to .htaccess
  5. As far as I am aware this only works on an apache web server (which fortunately is the vast majority of web servers)

Making html look like ASP



Example Text Links