I'm having a little bit of a problem trying to display something when the URL is a specific one.

Basically purely for examples sake, if the URL is I want it to display "Hello", and when it isn't I want it to redirect to another page.

I know how to do it in PHP, but I need to be able to do it in JavaScript. I applied the same principle on how I'd do it in PHP to JavaScript, and I'm not having much luck. He's what I have that doesn't work:

<script type="text/javascript">
var uri=location.href;

if(uri== {
else {

All your help is highly appreciated.