> I've been given conflicting answers about search engines picking up
urls like: http://mysite.com/index.php?var1=1&var2=2&var3=3
Do search engines pick up these urls?
For the most part, Google is the only search engine that counts. :-)
Google seems to be okay with URLs like that - as long as it finds the URL
within a site, it'll follow it and index it. Of course, you don't want
something like an ID in the that will change with each session. The URL
should always be the same for the same page.
To make the URLs shorter and to make it more likely that search engines will
index the page, you might do something like I'm doing with most of my pages.
I use Apache's Rewrite directive to shorten the URLs and make them look like
normal .html. For example, I have the following in my .htaccess file:
RewriteEngine on
RewriteRule ^news-(.*)-(.*)\.html$
index.php?nilsson=1&action=HOME&subaction=DISPLAY& detail=$1&articleref=$2
This makes the following URL:
http://www.harrynilsson.com/news-48-24269.html
do the same as:
http://www.harrynilsson.com/index.ph...ticleref=24269
Another trick you can use is to add "AcceptPathInfo On" to the .htaccess
file. Then you can use a URL like:
http://www.harrynilsson.com/index.ph...splay/48/24269
Inside your php code, $_SERVER [ 'PATH_INFO' ] will be set to
"/home/display/48/24269". You can "explode" it into the individual
parameters:
list($action, $subaction, $detail, $articleref) = explode("/",
$_SERVER['PATH_INFO']);
I prefer the first method even though it requires editing the .htaccess file
for different sets of parameters. I don't have any good reason for
prefering the method other than that the URLs look more like regular HTML
pages.
-- Roger
Harry Nilsson's "The Point!" on DVD
http://www.harrynilsson.com/news-48-24269.html