Hiding php includes from search spiders?

Posted by 21stcn on Pro Webmasters See other posts from Pro Webmasters or by 21stcn
Published on 2012-11-06T13:38:15Z Indexed on 2012/11/06 17:22 UTC
Read the original article Hit count: 409

Filed under:
|
|

Quick and simple question.

I have 80+ html files which I want to be crawled. They are individual product pages. Each of these pages calls its content using php includes. These php include files are in a separate folder on the server and contain the core content for the individual product pages.

I just wanted to ask, if I use robots.txt or .htaccess to prevent crawling of the directory that holds the php content files, will there be no issue crawling the html pages which include these files?

What I want to achieve is have the html files indexed with the php content included in them, but I don't want visitors landing on the php content pages, nor have these php files indexed as duplicate content. Just clarification needed as to whether it is safe to block spiders from accessing the php folder, without this affecting the html files being indexed with the included content.

Is this the best way to do things? Or should I just leave the content php files to be crawled?

© Pro Webmasters or respective owner

Related posts about php

Related posts about html