How To Remove PHPSESSID Session Id From All Pages Website URL
- Forums
- PHP
- How To Remove PHPSESSID Session Id From All Pages Website URL
sometimes you see the php session id automatically is put on the url of the browser, this creates a very confusing situation for search engines and i need to have it remove i will show you how to remove the session id from every page [950], Last Updated: Sat May 18, 2024
administrator
Wed Jul 26, 2006
1 Comments
1612 Visits
I am currently have my domain being hosted by another web hosting company. I have tried to get them to help me with an issue I am having. For some reason all my pages have ?PHPSESSION in the url when a new user visits my site. This includes search engines. I want this to be stop. I read somewhere that this is a configuration in the server itself. I told my webhosting provider but they said that they won't do it.
I am thinking of getting a dedicated server for my site, but if I do, I want to know how to get rid of this annoying thing.
This is an example of my site
http://www.wallpaperama.com/?PHPSESSID=c293e7c7c88a3679f804775ebbda.
I dont want my urls to have the PHPSESSID, this is not good for search engines.
1. Find:
2. Make sure the value is equals to 0 (zero) like this:
this is how my php.ini looks like:
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
;
; As of PHP 4.0.1, you can define the path as:
;
; session.save_path = "N;/path"
;
; where N is an integer. Instead of storing all the session files in
; /path, what this will do is use subdirectories N-levels deep, and
; store the session data in those directories. This is useful if you
; or your OS have problems with lots of files in one directory, and is
; a more efficient layout for servers that handle lots of sessions.
;
; NOTE 1: PHP will not create this directory structure automatically.
; You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
; use subdirectories for session storage
;
; The file storage module creates files using mode 600 by default.
; You can change that by using
;
; session.save_path = "N;MODE;/path"
;
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
session.save_path = "/var/lib/php/session"
; Whether to use cookies.
session.use_cookies = 1
; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1
; Name of the session (used as cookie name).
session.name = PHPSESSID
; Initialize session on request startup.
session.auto_start = 0
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
; The path for which the cookie is valid.
session.cookie_path = /
; The domain for which the cookie is valid.
session.cookie_domain =
; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php