PDA

View Full Version : Do search engines index a site with a "?query" in the URL?



Canuckkev
July 8th, 2003, 01:25
What I want to do is be lazy and do the index.php?page=blah so I only have to make a blah.inc.php to include. But, I heard search engines do not index pages like this...I did a quick look through google, and saw a few "questionable pages" (urls with a ? in them). But, does anyone know anything on the matter? Do you not get as good a ranking?

Or would it be preferrable to use "http://domain.tld/index.php/blah" I think that looks nicer, but does anyone know if that will cause problems with browsers and whatnot, because it is a bit of a funny url...

Does anyone know? And don't you think "index.php/blah" looks much nicer than "index.php?page=blah"?

My code I will use...:


$script = $_SERVER["PHP_SELF"];
$script = str_replace("/index.php/","","$script");
if(file_exists("$script.inc.php")){
include("$script.inc.php");
}
else{
include("index.inc.php");
}


NEVERMIND, I found a useful site: http://www.websitepublisher.net/article/search_engine_friendly_urls/

Anyone with dynamic sites should read this!

dawizman
July 8th, 2003, 01:51
Umm, i dunno if you know this, but search engines dont use a billion pages, they use a database, which is alot easier to index sites with.

Canuckkev
July 8th, 2003, 02:02
He he...I know...I mean when they spider your page.

I read a while ago that if you have a site that uses links like this:

http://domain.tld/index.php?page=home
http://domain.tld/index.php?page=email
http://domain.tld/index.php?page=links
http://domain.tld/index.php?page=blah


That the spider will not crawl those links...only to plain old "file.ext" page.

So, then I was going to link like:

http://domain.tld/index.php/home
http://domain.tld/index.php/email
http://domain.tld/index.php/links
http://domain.tld/index.php/blah

But according to that article, your page might still not be picked up.

So, I am using the "ForceType" apache directive. My links are now:

http://domain.tld/index/home
http://domain.tld/index/email
http://domain.tld/index/links
http://domain.tld/index/blah

This method is more valid, the only drawback is it depends on an apache server. Thanks for your help, Google!

dawizman
July 8th, 2003, 03:08
Sorry, misread your post. Thought you were going to make a search engine. Now i see you are just trying to get all your pages picked uip by engines.