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.
|
|
|
|
|
![]() |
||
Articles, PHP and search engines
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
||||
|
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.
|
|
|||
|
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? |
|
|||
|
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
|
|
||||
|
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. |
|
|||
|
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 |
|
|||
|
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 |
|
||||
|
Re: Articles, PHP and search engines
Yeah, they index them. I'm merely talking about PHP. You shouldn't be looking in Apache...
|
|
|||
|
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 |
|
||||
|
Re: Articles, PHP and search engines
Oh, I get it. Why not use the titles of the articles, though?
|
|
|||
|
Re: Articles, PHP and search engines
Meh, its easier to use ID for me.
Cause Im using something like...
|
|
||||
|
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.
|
![]() |
| Tags |
| msn, php |
| Thread Tools | |
|
|
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 |