473,802 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHPSESSID, Googlebot and .htaccess

Googlebot has been picking up numerous PHPSESSID name/value pairs in
URIs at my website, and this causes duplicate hits and wasted bandwidth.
I've since prevented PHPSESSID generation in my PHP script if
Googlebot makes the request; like so:

if(preg_match("/googlebot/i", $_SERVER['HTTP_USER_AGEN T']) != 1)
//session code here

....but this doesn't stop the PHPSESSID requests from Googlebot because
they're already stored in its database, and it continues to request
query strings like this one:

<hxxp://mysite.com/getdetails.php? personID=I23&tr ee=num1&PHPSESS ID=e0489b957f2d 336974ed7f2d71d b2bab>

Therefore, I'd like to use modrewrite (in .htaccess) to permanently
redirect to the same page after stripping out the PHPSESSID name/value
pair..but I'm having great difficult in figuring out how to do this. (I
can strip it if it's the only name/value in the query_string, but not if
there are other name/values in there, as in the example above.) I now
wonder if it's even possible.

Yep, I've Googled exhaustively and you're better than me if you can find
a solution that way.
--
John
Nov 25 '05 #1
0 1761

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

Similar topics

1
7832
by: AmigaLemming | last post by:
As I understand my admins installed a PHP server and now my plain HTML pages also want to set a PHPSESSID cookie when loaded into a browser. Can I suppress this, e.g. by creating a configuration file like ..htaccess somewhere in my public_html directory? Is it possible to disable the setting of PHPSESSID cookies for plain HTML pages in general and maybe for PHP pages that don't need to track any session information?
8
6899
by: JohnS | last post by:
Hi, When I initially start my browser (any of 'm) and point it to my PHP script the $PHPSESSID is always blank. On all subsequent hits or after a refresh the value for $PHPSESSID is fine... why do I have to complete a php file before the $PHPSESSID is set? I tried to do session_start() before anything still blank, what did I miss? (Aix 4.3.3, php 4.2.1,Apache 1.13.26)
3
7328
by: edward hage | last post by:
Hello , I want to pass some $_SESSION data to another page. I can pass PHPSESSID along using echo '<br /><a href="page2.php?' . SID .. '">page 2</a>'; However, I want to fill in a table with values and include PHPSESSID with it. This does not work. I tried somethink like this: <INPUT TYPE="Hidden" NAME="PHPSESSID" VALUE="<?=SID ?>">
3
774
by: Quinonez | last post by:
how can i get the PHPSESSID to not show on the results of a form i have created?
3
5717
by: James | last post by:
PHP is making a right mess at the moment and insists on putting a PHPSESSID in forms, urls and other spots on a script I am running. Is there any way to stop it doing this? Part of the issue is it is inserting an ampersand in the url instead of &amp; --- ampersands are not valid HTML Trans and I am trying to make sure my pages are valid. Forgive me if I have asked this already today - I've been sitting here for hours wondering if I indeed...
2
7754
by: frizzle | last post by:
Hi there I have a site in which all pages ARE php-pages, but they're called/manipulated with htaccess. All files appear as a html-file to surfers. Sometimes i get the PHPSESSID declared in the url. I want to avoid this from caching in the browsers history. is there a way to detect if PHPSESSID is set, and if
29
4877
by: CAH | last post by:
Hi Can you avoid that googlebot indexes PHPSESSID pages? Googlebot is indexing pages with PHPSESSID, which makes it think my page has a infinite number of pages. How can one avoid this? Here is an exsample of url that google register, that might make is more clear what is happening www.winches.dk/winches.php?artnr=500735&PHPSESSID=d22126f0d46334659ff...
5
3468
by: nigel.t | last post by:
I have a page that contains just <?php session_start(); $_SESSION = 'HELLO'; $host = $_SERVER; $uri = rtrim(dirname($_SERVER), '/\\'); $extra = '../listings/store.php'; header("Location: http://$host$uri/$extra"); exit;
5
2918
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi everyone! I get some errors lately regarding: HTTP_USER_AGENT Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) and: System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
0
10538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10305
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...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
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
7598
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
6838
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
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
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

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.