Forum Moderators: coopster

Message Too Old, No Replies

PHP and spidering

         

hexdj

7:28 pm on Aug 13, 2005 (gmt 0)

10+ Year Member



I have a few PHP snippets that become part of every one of my php's, like index.php loads navigation.php for example. How can I make those snippets non-spidarable, so search engines won't direct people to those snippets but to the actual files, like index.php?

DanA

7:46 pm on Aug 13, 2005 (gmt 0)

10+ Year Member



Search engine have no reason to spider those files as they are included and never appear as linked to a page.

JJao

8:14 pm on Aug 13, 2005 (gmt 0)

10+ Year Member



Like DanA said, they're not linked to so it won't be much of a problem.

But if you do want to hide them further for SE's you could always include the php files from a directory in which you keep the spiders away with your robots.txt file.

And my preferred method is to include them from a system directory known by the webserver but unaccessable from the Internet. This hides them for most people as well.

And if you're even more paranoid, say you don't trust security policy and other users on the same webserver for instance, you could even encrypt your php files. This requires some webserver add-ons though...