Web Hosting Talk







View Full Version : is this url search engine friendly?


hcn
04-21-2004, 06:34 PM
Can you someone tell me:


http://www.comweb.com/?module=displaystory&story_id=631&format=html

IvanCn
04-21-2004, 09:11 PM
I am sorry, it does not work

C~J~V
04-21-2004, 09:25 PM
as a rule of thumb, anything with a "?" in the url is not SE friendly.

Burhan
04-22-2004, 03:24 AM
This is one of those myths of search engines.

? in a URL does not make a difference with search engines.

Here is an example (http://www.google.com/search?q=nuke+modules). You might also want to check Google's Webmaster Information (www.google.com/webmasters/facts.html) section.

Salathe
05-05-2004, 01:16 PM
In reply to all of the above comments,

Most search engines are not stupid. If they trawl a page with links to a news article at "example.com/cms.php?module=news&article=oranges%20and%20lemons" (for example) then there is nothing stopping the robot from visiting that page with that querystring.

Now, humans on the other hand would have problems remembering complicated urls such as the example above. Roll in the 'trend' towards clean urls! Wouldn't it be so much nicer is someone could visit the url "example.com/news/oranges_and_lemons"? It is infinitely more easy to remember, not to mention to type.

Not to mention that with the second example, the whole system could be changed server side (eg, using C# rather than PHP, or playing around with the structuring of files) with the url still working just fine, whereas example 1 would provide a broken link and a lovely 404 error message.

So, in terms of "future-proofing" and keeping your links clickable, the second example is surely the way to be headed. There is much, much more that can be said about improving the web for surfers and robots alike, but lets not get into that.

Cheers,
Salathe

ambirex
05-05-2004, 01:51 PM
Salathe, you could do it with php+mod_rewrite
edit: I missed your point :confused: , I see you meant you could change server architectures and keep the URL's the same.
(ambirex = :dunce: )

http.conf

RewriteEngine on
RewriteRule ^/(.*) /redirect.php [PT]


redirect.php

<?
require_once 'some_classes.php';

// assuming example.com/news/oranges_and_lemons
$parsed = split("/", $_SERVER['REQUEST_URI']);
$module = new $parsed[1];
$module->show($parsed[2])

?>


(I haven't check the code, just a rough example)

SimplyDiff
05-05-2004, 02:06 PM
I always use PATH_INFO to do it, that way I don't need to mess with mod_rewrite or anything else and it is portable across systems.

So, if my php/perl/whatever script is named "whatever", all my URL's are in the format

mydomain.com/whatever/var1/var1value/var2/var2value

Or something similar to the above. Then I just parse PATH_INFO for everything I need, I also parse the query string. That way I can mix and match without messing things up.