Go Back   Internet Business Forums > Design & Development

Reply
 
Thread Tools Display Modes
Old 07-04-2005, 10:35 AM   #11 (permalink)
Senior Member
 
vpssupport's Avatar
 
Join Date: Mar 2005
Location: Bedfordshire
Posts: 155
Default Re: An Introduction to building pages with php include statements

Hi Brian,
with reference to your reply - "As for search engines - they never see the code - it is all processed on the server *before* the pages are published to the net. So in its simplest form, it is can become just a more dynamic way of working with HTML".

Am I right in thinking that when search engine bots just look at your index page they will be able to see all content on that page as if it was one file?
__________________
Regards,
Clive Rutherford
www.vitalproductsolutions.co.uk
vpssupport is offline   Reply With Quote
Old 07-04-2005, 12:44 PM   #12 (permalink)
Junior Member
 
RandallDesign's Avatar
 
Join Date: Aug 2004
Location: Sutton, Surrey
Posts: 28
Default Re: An Introduction to building pages with php include statements

If ever there was an argument for server-side includes....

Let's say a client wants a small change to his logo, perhaps to darken the colour.

If you have a "header.php" file being included, only that 1 file needs changing. Hurrah.

If, like me, you used the same XHTML file as a template throughout the site then, like me, you have to spend 4 hours reinserting the image into every single bloody arsing file!

Was poor planning on my part in the original plans for developing the site, however I learnt from that mistake.

Dave
__________________
Randall Design: Accessible, affordable websites for the small business.

www.randalldesign.co.uk
info@randalldesign.co.uk
RandallDesign is offline   Reply With Quote
Old 07-04-2005, 01:54 PM   #13 (permalink)
Senior Member
 
vpssupport's Avatar
 
Join Date: Mar 2005
Location: Bedfordshire
Posts: 155
Default Re: An Introduction to building pages with php include statements

If we change all our files to .php would a search engine have difficulty knowing its the same site and change its ranking?
__________________
Regards,
Clive Rutherford
www.vitalproductsolutions.co.uk
vpssupport is offline   Reply With Quote
Old 07-04-2005, 03:17 PM   #14 (permalink)
Business Guru
 
Brian Turner's Avatar
 
Join Date: Dec 2003
Location: Near Inverness, Highlands, Scotland
Posts: 7,716
Default Re: An Introduction to building pages with php include statements

If you're only building relatively few static pages, then a better idea would perhaps be to use folder names in your URL, rather than a filename with extension.

That way, if you ever change extension - ie, moving from PHP to ASP or JHTML - then your URLs will be preserved fine.

The reason is that search engines don't index pages, as much as URLs - so if you change your URLs, search engines only see new pages, and any ranking advantages the old ones had could need to be rebuilt.

ie:

domain.com/folder/keyword/

as opposed to:

domain.com/folder/keyword.php

And because the code is processed by the server first, the search engine spiders will never read the php code - merely the HTML the PHP code calls up.

As for David - yeah, we all learn the hard way.
__________________
SEO specialist
Brian Turner is offline   Reply With Quote
Old 03-05-2005, 11:23 PM   #15 (permalink)
Senior Member
 
Join Date: Apr 2005
Posts: 147
Default Re: An Introduction to building pages with php include statements

I have a question about php - how do get a list to go into three columns alphabetically ie a b c on one line then d e f on other etc do I use php for this or do something in mysql? Or is this an html thing?
__________________
www.promomat.biz - new leather handbags just in
www.yuckyslugsandsnails.co.uk
Globalart4u is offline   Reply With Quote
Old 04-05-2005, 08:31 AM   #16 (permalink)
Business Guru
 
Brian Turner's Avatar
 
Join Date: Dec 2003
Location: Near Inverness, Highlands, Scotland
Posts: 7,716
Default Re: An Introduction to building pages with php include statements

A single problem can have multiple solutions.

It depends upon what you are actually trying to achieve - but I'm sure a set of PHP includes could do you fine here.

Try starting a new thread in the web design board to detail your problems, and see what possible solutions are offered.
__________________
SEO specialist
Brian Turner is offline   Reply With Quote
Old 09-01-2008, 05:30 PM   #17 (permalink)
Gigantic Member
 
lin robinson's Avatar
 
Join Date: Dec 2007
Location: Mexico
Posts: 305
Default Re: An Introduction to building pages with php include statements

Quote:
Thanks Brian!!! maybe you should setup a donation box lol!!
Requiring animal sacrifices makes a more dynamic statement.

This is so helpful, Brian. One question: the index.php file getting called by the URL.

I have seen that if the url is http://mysite.com/index.php it works, but using the naked URL just goes to the index.html file. So is the situation that if their is an index.html file present, it gets called, but if not the php index will be what presents?
__________________
MEXICAN SLANG 101
lin robinson is offline   Reply With Quote
Old 09-01-2008, 06:19 PM   #18 (permalink)
Super Moderator
 
Join Date: Apr 2006
Posts: 507
Default Re: An Introduction to building pages with php include statements

the default document for the virtual directory is often the .html file rather than the .php

Generally, you would only want either the .php or the .html to be in place to avoid confusion. Some control panels will allow you to control the order of the default document list, if so, then you could put index.php above index.html and it would serve the php file.
monaghan is offline   Reply With Quote
Old 10-01-2008, 11:00 AM   #19 (permalink)
Business Guru
 
Brian Turner's Avatar
 
Join Date: Dec 2003
Location: Near Inverness, Highlands, Scotland
Posts: 7,716
Default Re: An Introduction to building pages with php include statements

If you want index.php to show, best to remove index.html.

I actually do have a few sites where I have an index.html page which then calls up and re-arranges data from index.php because there's more control, and the index.html shows instead of index.php on a root folder request.

In other words, the prioritisation of .index.html over index.php is something you can use to your advantage.
__________________
SEO specialist
Brian Turner is offline   Reply With Quote
Old 31-01-2008, 11:49 AM   #20 (permalink)
Junior Member
 
Join Date: Jan 2008
Posts: 1
Default Re: An Introduction to building pages with php include statements

Hi, This post is very informative, however ther are some queries to ask about some specific topic. If someone can help me then please send me a private message. Thanks,

hataish is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT +1. The time now is 08:44 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.