Question: So, two questions!

1. When using header('location: newHome.php') Does that file need to be in the same directory?

I was going to have my signOut.php in the main directory, and be able to sign out of the website from any page.. example.com/example/example.example.html
2. My code just returns a error page at example.com/signOut.php The signOut.php is in the same directory as where I am testing it from..

**example.com/example.php**

```
<li><a href="signOut.php"><strong>Sign Out</strong>

```

**example.com/signOut.php**

```
<?php 
session_start();
$_SESSION = array();
session_destroy();
header('Location: http://www.example.com/newHome.html');
?>

```

Answer: 
either, in the same folder

```
header('location: newHome.php');

```

or, not in the same folder

```
header('location: path/to/newHome.php');

```

or, a full URL 

```
header('Location: http://www.example.com/newHome.html');

```
```
ob_start();
header('Location: http://www.example.com/newHome.html');

```

just use **ob\_start();** before header it will help