Forum Moderators: coopster

Message Too Old, No Replies

php template system and searchengines

template content through searchengines?

         

StickeR

3:35 pm on Jan 3, 2005 (gmt 0)

10+ Year Member



Hi,

I've been working on a new design for our website, and we came up with a php template system, which reads a content page from a folder "conent"(html files). as such: index.php?content=pagex

Now I was wondering if a searchengine would pick up a page from the pages folder, the viewer would only see the text because the design, menus etc are all being created by the index.php.

The above we do not want to happen! is there ny way to avoid such an incident?

As always many thanks in advance, for even reading this.. :)

dreamcatcher

5:00 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe you should forget passing the template page as a query string, and use an include file instead? There are some tutorials online about templating systems, which you may find useful. A search on Google should find you something.

kilonox

1:00 am on Jan 4, 2005 (gmt 0)

10+ Year Member



Just dont put your template files in a viewable document root. There are many ways to template, the most used are probably include/require, mysql, and text.

StickeR

1:31 am on Jan 4, 2005 (gmt 0)

10+ Year Member



Our template thingy is based on 1 page (index.php) with a include function, in which the content is being called.

But what exactly do you mean with a viewable document root?

Right now this is the set-up:
public_html/index.php <-1 file
public_html/pages/page1.htm etc <-all pages, indexes turned off through Cpanel

Sorry about this, Im still quite the noob when it comes to these sorts of things

vabtz

2:57 am on Jan 4, 2005 (gmt 0)



you should patent that

probably could make a pretty penny
</sarcasm>

Look into Smarty for php

rubenski

9:53 am on Jan 4, 2005 (gmt 0)

10+ Year Member



Sticker, I've been looking for good template solutions in the past week. Smarty looks promising, but I wanted to build something myself. I don't know if you are into OO programming with PHP, if so I can really recommend a tutorial at phpfreaks.com. Search for 'site:phpfreaks.com template class' in Google.

StickeR

12:34 pm on Jan 4, 2005 (gmt 0)

10+ Year Member



Yeah that Smarty does look usefull, but the whole template thing for this site, is eventually for a school project, in which we aren't allowed to use prefab systems or such, we have to 'build' it ourselves.

Which leads to the tutorial Rubenski mentioned, but that is a bit over my head, but I appreciate the info.

dreamcatcher

1:03 pm on Jan 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is a template tutorial at Codewalkers which is pretty good.

StickeR

1:59 pm on Jan 4, 2005 (gmt 0)

10+ Year Member



Don't get me wrong, I appresiate all the help, but we're drifting away from the original question:
Will searchengines find my contentpages?

vabtz

2:04 pm on Jan 4, 2005 (gmt 0)



Yes but to get better indexing I would use mod_rewrite to remove the [foo.com?somevar=this...] stuff

jdonnell

7:25 pm on Jan 4, 2005 (gmt 0)

10+ Year Member



Do you have any links to [yoursite...]
If not then I don't think any search engines will find them.

Just to be sure you can do something so that it isn't possible to even see those pages. I don't know if apache has a setting to 'turn off' a directory but you could always use mod_rewrite to redirect /pages/.* to index.php