Using a .htaccess file |
||||||||||||||||||||||||||||||
|
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
You may have noticed this page uses
this trick. 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 <html> Once this is done you can insert the PHP
codes into your web page and all should be fine Notes...
|
|||||||||||||||||||||||||||||
Example Text Links |