I've included the script in the .htaccess folder, but how do I get it working so that when someone hovers over a link it shows the .htm rather than .php and so Google picks up the pages as .htm Darren
Quick Tip: you may also want to put in an Apache handler for htm that runs the php interpreter regardless. As soon as I use php I activate the apache handler so htm(l) pages get interpreted as well, there is a very small performance overhead but one can simply keep using .htm or plug in php into an htm page without any problem. Like in your case makes switching on of mod rewrite later much easier. M
How will this affect a search using php pages? Obviously the search results are dynamically produced, so when you hover over the link you'd expect to see .htm(l) instead of .php. You say there is some Apache header? How does this work, all this is completley new to me. Thanks Darren
most sites (xNIX / Apache) in the beginning are set up for php to rely on the ending php to engage the pre processor thus htm(l) pages are not processed using php. You can add this processing to virtually any ending you like. Thus by adding php processing to htm(l) the ending htm will be run through the preprocessor as well. In my experience one ends up using snipets of php on virtually all pages. Depending on what you run, your ISP, etc either you may have to ask the ISP or if for example you have cpanel and nix and apache it is under site maintenance apache handlers where you can add the php processing to htm and html. Again on a standard install you should be able to simply add .htm application/x-httpd-php but that's without waranty. Also depending on your set up you may also wish to add this for .shtml as a lot of set up's seem to have custom error pages available but these end in .shtml. Thus if you can generate custom error pages you can generate these using php routines to intercept, guide users and send yourself alerts. Regarding users expecting .htm link when hovering I don't think so as most shopping carts sites are using php thus the ending is OK. No engine of my knowledge has any problem with .htm or .php as an ending. Personaly I like to do all major pages as htm sort of hiding the fact that there maybe extensive preprocessing. Hope this helps and best of luck. M
Wait. There is a bigger performance hit -- for both your customers and your server -- than just the file getting processed by the PHP interpreter. This also causes Apache to send the whole page every time the customer returns to the page, instead of just replying to the request with a status of 304 ("the page hasn't changed, your copy is still good"). For some this will be minimal; for me it's a significant hit. Depends on file size and how visitors browse the site. If someone knows how (conditionally) to tell Apache to reply with 304 to requests for a page that it PHP-processes, that would be exeremely useful to me.
You are right that after the original bug apache resends the page but in travel and similar fast moving environments I rather send a new page, graphical elments get cached anyway. I use php caching for serious traffic (>5000 pages min) but here is a link to a 304 script http://ontosys.com/php/cache.html Cheers M