472,973 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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=asphalt

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 2959
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=asphalt

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***@pricetrak.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=asphalt

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=asphalt&month=2004-01
main.php?dir=asphalt&month=2003-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=asphalt&month=2004-01
main.php?dir=asphalt&month=2003-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
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...
3
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...
25
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
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...
2
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...
1
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...
9
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.