My URLs look something like this:

http://miasmo.com/node/view/5?PHPSESSID=93d5b29abebbd31a8cc53e2ac691abcf

I previously had my drupal site on a different server and the URLs looked much more reasonable:

http://miasmo.com/?q=node/view/68

What am I doing wrong?

I have clean URLs enabled and tech support at my web host said they do support mod rewrite.

Comments

bjornarneson’s picture

Use drupal.org search for "phpsessid" for many pages related to solution.

--
Bjorn
http://choirgeek.com
because there's no 'I' in ensemble

miasmo’s picture

For anyone else that has this problem, here's what I found:

A quick fix for ?PHPSESSID problem
m_freeman2004 - December 30, 2004 - 20:43

The following can be added to the .htaccess file:

# Fix for ?PHPSESSID in clean URLs
php_value session.use_trans_sid 0
php_value session.use_only_cookies 1
# End of fix

Notice the use of boolean values instead of on/off

And it worked. (I have version 4.4.2)

xian’s picture

that code should be added to which .htaccess file , the one within the drupal folder which came with the download drupal.zip package? or the .htaccess file in the public_html directory?
I put that code in the .htaccess file which is inside the drupal folder and then afterwards when i accessed my site it gave me an internal server error. I had to remove those lines to access my site again.

djnz’s picture

... so you need to do this instead.

In 4.6 there is a line in sites/default/settings.php that tries to override the setting in php.ini:

ini_set('session.use_trans_sid', 0);

But this setting cannot be overridden at runtime. Fortunately there is a work-around: replace this with:

ini_set('url_rewriter.tags', '');

If you don't have this section in settings.php it doesn't matter - just use the above line somewhere in settings.php. This should really be patched in a future release.

xian’s picture

Thankyou, that fix worked. I do not see the &PHPSESSID=blahblah part anymore.
Also I needed to ask you this one more thing, does drupal block google bots?, I read somewhere on this forum that it might block google bots if the url's contain the &PHPSESSID=blahblah part in them, is it true?...If it does will this fix allow those search bots to enter?