PHP Scripts Don't Have to End in .PHP

By Robert Plank

If you tweak your site to perform better in search rankings then you practice the science of Search Engine Optimization (SEO).  It's possible to start using PHP scripts on your site without losing that high ranking of yours.

You've probably noticed your site rise and fall in search engine rankings quite a bit.  That's just how it goes since search engines such as Google like to change their algorithms around.

If one day you decide to rename all the files on your site you can be sure your Google listing will moved off page 1 of your target search keyword onto the back-listings of page 67 and beyond.

When you rename a file on your site, and another site links to that file, anyone coming to your site thru that particular link will get an error. When a search engine crawler sees this, it decides your site and decides either to lower your ranking or delete the URL from its search results entirely.

Search engines don't want to send their visitors to Not-Found pages... makes sense, doesn't it?

Okay, so let's say you don't want to have a ton of broken links across your site, which will cause you to drop in the search results, but you want to tinker with PHP a little bit.

There's an easy fix for that.  You can actually name your PHP scripts so that they end in .htm or .html, and have them run as PHP scripts on your web server.  So from the outside world it'll look as if your site is full of "updated-by-hand" content.

All you have to do is add this line to your .htaccess file:

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

If you don't have an .htaccess file, all you have to do is put that line of code up there into a new text file, save it as ".htaccess" (with the dot in front) then upload it to your web server.

As soon as you set this up, try going back to your site.  Everything should look exactly the same, with the exception that your HTML pages are all now PHP-enabled.

So you could setup a simple script like the one here: http://www.jumpx.com/tutorials/1

... And put that on any HTML page of yours.  It will work exactly the same as if the file ended in .php instead of .html.  Neat, huh?

You could even go crazy and change that line of htaccess code to add in more weird file extensions, for example:

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

This would parse any page ending in .html, .htm, or .ezine as PHP.  So you could name a file something crazy like "subscribe.ezine" and it would work as a PHP script, or in other words as an HTML file with PHP tags in any place you want them.

For thank you pages sometimes I like to make the extension .thanks or .order just to make it harder to guess.

If you wanted to go totally nuts, you could even put something like this in your .htaccess file:

DefaultType application/x-httpd-php

With that, any file without an extension (so if you named a file "download" instead of "download.php") will be "assumed" to be a PHP file.  Any unrecognized extension would default to PHP.

The reason I say you can go totally nuts with this is because now you can now name a file to something that isn't already used -- like site.blog, or form.feedback, subscriber.area or bonus.page.

Experienced PHP/JavaScript Tutor Solves 19 Of Your Most Frustrating Direct Response Sales Page Hang-Ups http://www.salespagetactics.com

 

 

Home
3 POWERFUL Ways To Profit From Your BLOG
Sorry But You Never Called
5 Powerful Reasons WHY Niche Content Sites Are
5 Quick Tips On HOW TO Build Google Adsense
5 Ways To Boost Your Google AdSense Earnings
6 Steps To Picking Profitable Adsense Keywords
A Website Model That Makes Money Online
Adsense Adwords make money or lose it
Advertising in RSS Feeds
Article about Keywords Research
Article Bot More Than a Page Generator
Articles and Adsense
Ballistic Bloggers and White Hat Freaks
Can YOU Really Make Money From Blogging
Co registration is the latest buzz word
Creating A Succesful Forum
Creating Content Sites Around Profitable Niches
Defend Your Thank You Folders From URL Guessers
Digital Resell Rights Are Meant for Lazy People
Does Yahoo Admit Sites With Advertising
Does Yanik Silver really change lives
Explode Your Google Adsense and Affiliate
Fast And Easy Traffic Generation Methods
Future Relevancy or Page Rank
Getting Traffic To Your Website Is Easy Right
Google AdSense Stats and Performance Tips
How to gain the edge in affiliate marketing
How to Monetize With Adsense and Pay Per Leads
How To Overcome Niche Idea Block
How To Really Profit from Domain Names
Kick Off Your Web Traffic Virus
Mentors and Prot g s
My Top Free Non Marketing Applications
Niche Internet Marketing Tactics Part I
PHP Scripts Don't Have to End in PHP
Premiership Highs and Lows Manchester United
Search Engine Forensics
Secret Weapons Of A MASTER Butterfly Marketer
Starting a Home Business 7 steps
Successful Internet Marketing
Targeted Traffic with Pay Per Click s
The Cheapest Traffic Generation Method
The Evolution of Google AdSense
The Greatest Internet Marketing Strategy Using Goo
The No Work Money Making Website
The Rush A Newbie's Internet Marketing Journey
The Ugly Truth
Time Tested Marketing Still Alive and Well
What is Internet Marketing
Why AutoResponders can be Legally Required
Winning the Google AdSense War
Site Map