echo $_SERVER['PHP_SELF']; always points to drupal/index.php even though I'm at drupal/clean_name

(I have clean names enabled)

Is there another way to have a page link to itself? Perhaps some drupal specific variable that works with clean path names?

Comments

yelvington’s picture

The server looks to find /foo/bar/ in the filesystem and, if it's not found, hands the "error" to drupal's index.php, which looks at the request to see what action should be taken.

So, in other words, it's supposed to work that way.

Try $_SERVER['REQUEST_URI'] instead.