One method of generating revenue from a website that’s fast becoming one of my favourites is through the selling of on-site text links. It’s quick to add new websites into your portfolio and there’s a healthy supply of advertisers if you have what they want.
I was just in middle of listing one of my well-established content websites with TLA when I suddenly realised that there was no ad code for static .html suffixed web pages. I was hoping for a JavaScript solution, but since the code needs to write to the server file system a server-side platform was required.
A less than ideal workaround would have been to rename the relevant files to .php and amend all of the internal links to those pages. Unfortunately, what I wouldn’t be able to do is amend any inbound links from external sources so any links to specific .html pages could end up being broken. What I really needed was to be able to incorporate the TLA code without breaking the current website file structure.
Fortunately, an extra line in the websites .htaccess file allowed me to include PHP code in my static .html files as have them parsed as if they had a .php extension.
So, half an hour later, I’ve added another potential $100 a month income stream thanks to TLA and the following line in my .htaccess file.
AddType application/x-httpd-php .php .html
Technorati Tags: Text Link Ads, TLA, PHP, .htaccess
![]() |


Leave a reply