How to detect the current URL? I would like to add a body class in D6 if you are on a specific page(s) currently in my template.php I have:

if url('the/path') {
 add the body class...
}


but that function doesn't seem to be working for me.
Drupal's Alias is what your looking for

&lt;?php
$path = drupal_get_path_alias($_GET['q']);
if ($path == 'the/path') {
  // do stuff
}
?&gt;


Others Below:

Full URL

&lt;?php
global $base_root;
$base_root . request_uri()
?&gt;


Drupal's "Internal" URL

&lt;?php
$arg = arg();
// Path of 'node/234' -&gt; $arg[0] == 'node' &amp;&amp; $arg[1] == 234
?&gt;