Articles, PHP and search engines

This is a discussion on "Articles, PHP and search engines" within the PHP Forum section. This forum, and the thread "Articles, PHP and search engines are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Dec 17th, 2006, 20:55
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Articles, PHP and search engines

Hey

Im making a site full of articles. I made a CMS which stores the articles in a DB, and then theyre displayed by... displayarticle.php?id=XX

See what I mean? My Q is that, will search engines still pick up on my long articles ifits done like this? Because the article will be DB'ed and oly display through that. It important to me that things like MSN, which uses word relevance, finds my articles. How do other sites containing articles do it?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Dec 18th, 2006, 11:25
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

I believe Google does not index ID's. Don't do this! There are way better ways to go about it. My favorite is using something like this:

http://domain.com/?/todays-news/

I use this code to handle complex $_GET variables. It's splits it all up by the forward slashes and corrects the position if there isn't a slash in front or at the end.

PHP: Select all

$home "/news/";

if(
count($_GET) == 0) {
    
header("Location: .?".$home);
    exit();
}

$location explode("/"key($_GET));

if(
$location[0] == "")
    
array_shift($location);
if(
$location[count($location) - 1] == "")
    
array_pop($location); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Dec 18th, 2006, 15:08
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Hey, Thanks for reply

I dont really get how that works. Any tutorials you can find (i dont know what to search for). Would my info still be stored in a database?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Dec 18th, 2006, 15:08
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

No they don't, and it really sucks because that is such a great way to do a site full of articles.

I'm facing the same problem. One solution is to just upload out a bunch of text-only (i.e. super-small file) html pages with the text and appropriate <head> entries and put the links somewhere they aren't too noticed, with maybe an indication that these are text-only.

You think you have problems? All my links are automatically generated by php as well as the content!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Dec 18th, 2006, 15:15
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

^^ Unlucky. I think I might just go back to plain HTML pages and do it manually (uuughhh), but hopefully Ryan can help me out
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Dec 19th, 2006, 12:38
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Basically, what that script does is it takes everything after the question mark and organizes it. Say you had an article format like this:

yoursite.com/?/2006/12/19/the-title-of-the-article/

You could use the code I gave you to query a database based on the information after the question mark. It looks like a directory path, but it's really just info PHP can read.

In the above URL, here is what the array values would be using the script in my previous post:

$location[0] = 2006
$location[1] = 12
$location[2] = 19
$location[3] = the-title-of-the-article

The last two if statements make it work even if there are some mistakes in the path, like missing the leading or trailing slash. Understand?

I believe URL's should tell a visitor where they are on a site, so aside from the question mark, a user can figure out where they are.

Last edited by Ryan Fait; Dec 19th, 2006 at 12:44.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Dec 19th, 2006, 14:34
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Ahhh, thanks! Do search engines index pages like that yeah? Even if my articles are stored in a DB?

Thanks again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Dec 19th, 2006, 16:38
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Hey

Are there any tutorials on this? All I can find is 'mod_rewrite', surely its not that much of a hassle to be picking around in APache files?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Dec 20th, 2006, 01:49
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Yeah, they index them. I'm merely talking about PHP. You shouldn't be looking in Apache...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Dec 20th, 2006, 16:57
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Hey

Got it sorted. I used mod_rewrite in my .htaccess file, so that like... domain.com/articles/XX.html would be the same as domain.com/articles?id=XX.

Ty
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Dec 21st, 2006, 10:04
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Oh, I get it. Why not use the titles of the articles, though?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Dec 21st, 2006, 14:51
Junior Member
Join Date: Jul 2006
Location: UK
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Meh, its easier to use ID for me.

Cause Im using something like...

Code: Select all
$id = 1;

while (blah blah)
{
 echo "Link: Article  $id";
$id++;
}
So that a list of articles is shown. I just find it easier to work with numbers to be ordered than names and stuff.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Dec 23rd, 2006, 13:38
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Articles, PHP and search engines

Look, with just a small amount of code, you could transform the title into a string using simply lowercase letters and hyphens. Both Google and visitors appreciate readable URL's. You're making a gigantic mistake by using meaningless numbers. Shortcuts are awesome, but don't hurt your site this badly by taking one.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
msn, php

Thread Tools

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fireworks and search engines Gabriele Search Engine Optimization (SEO) 9 Jul 9th, 2008 15:22
Search Engines NewDesigner Search Engine Optimization (SEO) 14 Mar 7th, 2008 14:04
How do i get search engines to do this to my site Devro Search Engine Optimization (SEO) 30 Mar 3rd, 2008 10:39
Search Engines takehiko Starting Out 3 Jun 30th, 2007 00:54
the-web-search-engines.com Lifeisjustaride Free Web Site Critique 10 Jun 8th, 2006 23:54


All times are GMT. The time now is 21:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42