473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PHP urls with variable data in search engine results

Howdy
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?
I've been considering converting a site of mine to PHP-Nuke, but if
the individual modules aren't picked up in search engines I'm not
going to do it.
Thanks
phpKid
Jul 16 '05 #1
1 3386
> 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
Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine...
8
by: Craig Cockburn | last post by:
Hi I'm aware of the use of robots.txt and the use of <META NAME="ROBOTS" CONTENT="index,follow"> However, what would be more useful is to be able to control within a page which elements of...
4
by: John | last post by:
Greetings, all, Several days after adding personalized URLs to my "amazing" collection of "God Loves (yourname)" mazes, it occurred to me that if someone were to create an offcolor term, then...
2
by: jmensch | last post by:
Hello. I'm a reasonably new ASP.NET programmer with no prior ASP or web development experience, but a lot of general programming experience. I'm using Visual Web Developer Beta Express 2005. ...
10
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're...
2
by: dbojan | last post by:
From this search engine: https://siteexplorer.search.yahoo.com/mysites when I make all subdomains search just by typing a domain url in a search box like blogspot.com -and after I verify my...
0
by: passion | last post by:
"Specialized Search Engines" along with Google Search Capability (2 in 1): http://specialized-search-engines.blogspot.com/ Billions of websites are available on the web and plenty of extremely...
2
by: anbaxter | last post by:
I have a small challenge and you'll have to excuse me because I haven’t touched JS for some time and have gotten a bit rusty. I have an intranet site at work that has roughly 500,000 htm pages...
8
by: Bruno Rafael Moreira de Barros | last post by:
I have this framework I'm building in PHP, and it has Search Engine Friendly URLs, with site.com/controller/page/args... And on my View files, I have <?=$this->baseURL;?to print the base URL on the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.