Dreamhost sets the annoying PHP configuration value session.use_trans_sid to true by default. That means the first time you visit a site hosted on Dreamhost using PHP sessions, the session ID is appended to the links in your page as a query string.

Not only does this make URLs ugly as hell, but it makes me uneasy thinking a user’s session ID — which is used to store information usually handled by cookies — is plastered all over a page.

Since I can’t edit Dreamhost’s php.ini file, I have to handle the configuration on my end. I run PHP as a CGI, so using ini_set to configure session.use_trans_sid or editing .htaccess won’t work.

But this very helpful article suggests using ini_set("url_rewriter.tags","") instead. Well, it works! No more ugly URLs!

Although I should probably be proactive and e-mail Dreamhost support to tell to turn the damn configuration value off.