include() question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

include() question

Post by thiscatis »

Hi!

I'm including pages in a main template, those pages are stored in a subfolder
so my ftp structure:

-index.php
---pages/page1.php
---pages/page2.php
---pages/page3.php
-images/

I'm using mod_rewrite to use friendly URL's
so url.com/page1/ is actually url.com/index.php?page=page1

The problem is, I want to DISALLOW access to search engine bots in the /pages/ folder.
But will it still pick up the includes pages then? (when using

Code: Select all

include()
(in other words, will google find url.com/page1/ when the /pages/ folder is a no no for the bot..)

Thanks!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I am so not understanding your question. What does include() have to do with the bots?
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

I'm not sure how search bot crawl through websites,
but if the folder where the actual content (tekst, images,..) is prohibited for those indexing bots
will the website be picked up if those pages are included in the main website?
because I alway thought bots didn't like dynamic urls, content etc..
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

So you basically don't want to allow direct access to the files you want to include? You need to use htaccess for that.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

There was a good, lengthy discussion on SEO a few weeks back. That might be good reading for you. I still cannot see how this has anything to do with the include() construct though.
Post Reply