Your Ad Here

 Navigation

Home
Source code
Tutorials
RSS feeds
Articles
Books
Software
Downloads
Hosting
manuals
Forums
Script directory
Training
Our Links

 Sponsors
 Links
dvd information
low cost magazines
wwwstores
 Downloads
 Misc

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming



PHP Scripts Don't Have to End in .PHP


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.

About the Author

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

(The above article may be copied
as long as this resource box is included,
You may rebrand the above URL with your Clickbank ID however)

Written by: Robert Plank

 



Here is our complete list of articles


Apache MySQL and PHP for Windows

Apache MySQL PHP for Windows

ASP CGI and PHP Scripts and Record Locking What Every Webmaster Needs To Know

Autoresponders With PHP

Bring Your Web Site to Life With PHP

Clickbank Security Using PHP

Create a Simple Effective PHP Form for Your Web Site

Creating Dynamic Website Content with PHP MySQL

Developing a Login System with PHP and MySQL

Developing State enabled Applications With PHP

For Automated Sites PHP and MySQL are A Perfect Match

Get PHP pages indexed in the Search engines

Getting your Visitors Details Using PHP

How PHP Can Help Save You Time And Mistakes

How to make a simple form mailer with PHP

HTACCESS Wrappers with PHP

Maguma has integrated support for the eBay Acellerator Toolkit for PHP PHP AT in their PHP IDE Maguma Workbench

Make a Search Engine For Your Website With PHP

Mastering Regular Expressions in PHP

More Autoresponders With PHP

MySQL Database Handling in PHP

ONLINE the eBay Accelerator Toolkit for PHP PHP AT for the PHP IDE Maguma Workbench is available

Password Protection and File Inclusion With PHP

Password Protection with PHP MySQL and Session Variables

PHP Account Activation

PHP and Cookies a Good Mix

PHP Auto surf Websites

PHP Databases

PHP Dynamic Content

PHP Email

PHP Encryption

PHP Error Pages

PHP Files

PHP Form Series Part 1 Validators Client side Validation

PHP General Scripting

PHP Image Gallery

PHP in the Command Line

PHP is 10 years old

PHP my favorite Server side Programming Technology

PHP On The Fly

PHP Pear Packages Why they are so important to php developers

PHP Redirect

PHP Server to Client with No Refresh

PHP Sessions / Cookies

PHP Templates

PHP User Login Authentication

PIM Team Case Study Creating Text Effects With PHP and GD

Protecting your HTML and PHP Source Code

Quick Intro to PHP Development

Serialize this Saving Objects in PHP

Simple Solution for Php Includes IFrames

Site Personalization With PHP

Some PHP functions you must know

Track Your Visitors Using PHP

Victoryvisions The PHP/Mysql Company Complete website development company



Books
 Sponsors
 Random Code
Create a MySQL database from PHP(database)

A to Z links(strings)

Output a number with leading zeroes(math)

 Random Article
  Network

Programming resources
Tutorials directory
General bid directory
sell software, make money
Find me wholesalers
Find me dropshippers
Free recipes online/a>
UK products and price comparison
Anime videos
Free lyrics search
free stuff
UK stores
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
Golf resources
iPod resources
Coupons and deals
Baby names
Domain names
Dating site
Scripts directory
Maxi directory
bigarticle : free articles
dawgwitch search
List of directories






beginners PHP Copyright © 2004 onwards by beginnersPHP.