Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I feed the spiders PHP in disguise?

Status
Not open for further replies.

rycrostud

Programmer
Jul 9, 2001
4
GB
As we all know, whether or not dynamic pages with .php/.asp/.cgi extensions are treated the same as plain .html files by the spidering search engines is a matter of constant debate.

I've recently discovered a very handy method of forcing your server to treat .php files as if they were .html by adding the following line to an .htaccess file:

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

The result is that you can create .html files with embeded PHP scripts and they are parsed in exactly the same way.

What I want to know is will a spidering engine such as Google or Inktomi be able to differenciate between a normal .html page and one that has been through the PHP interpreter. Both appear as plain HTML in the browser, but will this affect spidering?

FYI - none of these pages will have variable=value pairs passed in the URLs such as index.html?prod=23.
 
Spiders access your server the same way that a browser does so this should fool them. Some spiders may ignore anything passed as a variable.

I was surprised to find how many spiders successfully picked through my site which basically has one template page that is filled with variable content...

index.php?page=welcome
index.php?page=contact
etc...
 
If you want to erase all traces of PHP, then edit your php.ini file and set expose_php to off. With this on, PHP adds a HTTP header to the response.
And I don't think spiders cares if the pages are ASP, Perl, PHP, HTML, Python or whatever. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top