Possible Duplicate:
How do I get current page full URL in PHP
I want to do something like this:
if (current url is 'site.com/dir1')
do something;
else if (current url is 'site.com')
do something else;
What's a reliable way to find this out? Thanks.