473,786 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP , url and Google

dan
I have a site that I developed that uses I page main.php. all content
is decided by a variable. It's a magazine web site so there are
issues per month. I use a session variable to keep track of what
issue they are looking at. From that session variable I can change
color, background and menu list. Now the session variable is set by
default according to what month it is.

Now, there are regular articles that are in each issue so in each
issue you get:
main.php?dir=as phalt

And according to what issue the session variable is set to you will
get any of the articles by the same author.

QUESTION
If Google scans a previous month and it comes up on Google, it will
send you to the current column and not the older one that had the key
word in it. How can I make a URL that will allow Google to know the
difference?

Thanks for any help!
Jul 17 '05 #1
4 3007
dan wrote:
I have a site that I developed that uses I page main.php. all content
is decided by a variable. It's a magazine web site so there are
issues per month. I use a session variable to keep track of what
issue they are looking at. From that session variable I can change
color, background and menu list. Now the session variable is set by
default according to what month it is.

Now, there are regular articles that are in each issue so in each
issue you get:
main.php?dir=as phalt

And according to what issue the session variable is set to you will
get any of the articles by the same author.

QUESTION
If Google scans a previous month and it comes up on Google, it will
send you to the current column and not the older one that had the key
word in it. How can I make a URL that will allow Google to know the
difference?

Thanks for any help!


What a chestnut this is. Your problem is that you are generating content
which is not identified completely by the url. There's no way that a
search engine can deal with this. All of them work the same way;
indexing the URL which generated the text they have analysed.

What you need is to build a system so you can give a URL to go directly
to an article placed in whatever context you wish (several article
references may return the same page):
http://www.server.com/articles.php?article=3d56fe435e42
Or better still as some search engines still don't handle GET parameters
properly:
http://www.server.com/articles.php/3d56fe435e42.html
...and articles.php can pick out the article ref from PATH_INFO

Secondly you want to feed those to Google instead of your main url. You
can check the user-agent header for Google and redirect to a plain list
of all your article URLS. Google will then happily index them all for you.
Jul 17 '05 #2
dan
Well, in stead of using session variables, is there an easy way to
append a url variable to every hyperlink? Obviously there are
thousands of link in the site so I'm wondering if there is a way to
add the Issue variable to the end of every hyperlink so Google will
know.

Also does anyone know of a good tutorial on PHP and
http://www.server.com/articles.php/3d56fe435e42.html
..And articles.php can pick out the article ref from PATH_INFO
Thanks
Kevin Thorpe <ke***@pricetra k.com> wrote in message news:<40******* *************** *@news.easynet. co.uk>... dan wrote:
I have a site that I developed that uses I page main.php. all content
is decided by a variable. It's a magazine web site so there are
issues per month. I use a session variable to keep track of what
issue they are looking at. From that session variable I can change
color, background and menu list. Now the session variable is set by
default according to what month it is.

Now, there are regular articles that are in each issue so in each
issue you get:
main.php?dir=as phalt

And according to what issue the session variable is set to you will
get any of the articles by the same author.

QUESTION
If Google scans a previous month and it comes up on Google, it will
send you to the current column and not the older one that had the key
word in it. How can I make a URL that will allow Google to know the
difference?

Thanks for any help!


What a chestnut this is. Your problem is that you are generating content
which is not identified completely by the url. There's no way that a
search engine can deal with this. All of them work the same way;
indexing the URL which generated the text they have analysed.

What you need is to build a system so you can give a URL to go directly
to an article placed in whatever context you wish (several article
references may return the same page):
http://www.server.com/articles.php?article=3d56fe435e42
Or better still as some search engines still don't handle GET parameters
properly:
http://www.server.com/articles.php/3d56fe435e42.html
..and articles.php can pick out the article ref from PATH_INFO

Secondly you want to feed those to Google instead of your main url. You
can check the user-agent header for Google and redirect to a plain list
of all your article URLS. Google will then happily index them all for you.

Jul 17 '05 #3
dan wrote:
I have a site that I developed that uses I page main.php. all content
is decided by a variable. It's a magazine web site so there are
issues per month. I use a session variable to keep track of what
issue they are looking at. From that session variable I can change
color, background and menu list. Now the session variable is set by
default according to what month it is.


And that's a bad idea -- a URL should be uniquely identiying content
the day it sees the light of the Web. So you should also put the month
in the variable like this:

main.php?dir=as phalt&month=200 4-01
main.php?dir=as phalt&month=200 3-12
etc.

This helps for...
- Bookmarks
- Google
- All other search engines
- Links from the outside
- etc.

Now you might actually do a Google-referrer hack using the Google Web
API (you can find out which content is actually stored in Google for
your URL at any given moment in time by querying the Google Cache).
But instead of trying to debug the symptom, fix the source of the
problem.

Hope it helps!

--
Google Blogoscoped
http://blog.outer-court.com
Jul 17 '05 #4
dan
> And that's a bad idea -- a URL should be uniquely identiying content
the day it sees the light of the Web. So you should also put the month
in the variable like this:

main.php?dir=as phalt&month=200 4-01
main.php?dir=as phalt&month=200 3-12
etc.


ok, if I do this, does anyone have an idea how to dynamically add the
end variable to the end of every href? there are a lot of links and
to be able to append that variable to the end of it would be the
easiest.
Jul 17 '05 #5

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

Similar topics

13
2944
by: fuzzyman | last post by:
I've hacked together a 'GoogleCacheServer'. It is based on SimpleHTTPServer. Run the following script (hopefully google groups won't mangle the indentation) and set your browser proxy settings to 'localhost:8000'. It will let you browse the internet using google's cache. Obviously you'll miss images, javascript, css files, etc. See the world as google sees it ! (This is actually an 'inventive' short term measure to get round a...
3
4207
by: Alastair | last post by:
Hello guys, I've been building a search facility for an intranet site I'm part of developing and we've been building a search engine using Index Server. It mostly works, however there have been a few niggling problems and fixing it seems to be a case of patching errors as we find them so I'm thinking that it might be worth starting the logic from scratch and rebuilding this again. Basically we have a simple search, which is simply a...
25
2568
by: Tor Erik Sønvisen | last post by:
Hi I need to browse the socket-module source-code. I believe it's contained in the file socketmodule.c, but I can't locate this file... Where should I look? regards tores
9
2412
by: Ray5531 | last post by:
Sorry if this is irrelevant to this website,but I didn't find a better place to ask this question.I sent an email to google as well which I didn't recieve the answer.I'm creating a website and apparently the host hasn't registered me in googles search engine(I donnu why?) .I was rerading that if I add a Addsense program of google my webpage could be searchable and I earn money ,Is that right? Thanks
2
2044
by: gen_tricomi | last post by:
THE IMPORTANCE OF MAKING THE GOOGLE INDEX DOWNLOADABLE I write here to make a request on behalf of all the programmers on earth who have been or are intending to use the Google web search API for either research purposes or for the development of real world applications, that Google make their indexes downloadable. Currently application programmers using the Google web search API are
1
7292
by: xahlee | last post by:
Elisp Tutorial: Make Google Earth Xah Lee, 2006-12 This page shows a example of writing a emacs lisp function that creates a Google Earth file, and creates a link to the file, as well a link to Google Map. If you don't know elisp, first take a gander at Elisp Basics. I often write travelogs on my website. If i traveled to Las Vegas, then
9
3599
by: maheswaran | last post by:
Hi all, I developed one application. From that application i created dynamic pages contact us , about us...(like joomla, but application is not in joomla)... These all are comes from database.In this i have one doubt, how google can indexing these pages from database or is google can able to indexing these pages. For easy, i posted this question into bytes-> forum and its stored in database. But if am googled then i can able to see this...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.