I'm kind of new to HTML, PHP and stuff.

I'm trying to test locally a web site before putting it online. I set up my Apache server with PHP and MySQL and made a virtual server point localhost to

```
"C:/path/to/docroot/"

```

and everything works great.

Now in my index.html I have a link pointing to the file "mail-form.php" in the same directory (the C:/path/to/docroot/). In this link I only specified

```
href="mail-form.php"

```

and no absolute path, because I don't know which would be the absolute path in the production server and I don't feel like changing them all after testing. (Here I'm open for suggestions, if this is bad).

Now the thing I don't understand is the following: when I type in the browser's URL

```
"file:///C:/path/to/docroot/index.html"

```

and then click on the link, the browser tries to open

```
"file:///C:/path/to/docroot/mail-form.php"

```

and this doesn't get interpreted by PHP, but returned as text.

If I instead type in

```
"localhost/index.html"

```

and then click on the link, the browser calls

"localhost/mail-form.php"

and it gets interpreted properly showing what it should.

I can obviously live with this, but I'm curious if there is a way to make Apache/PHP serve the "file:///..." thing just as well as the "localhost/..." thing? After all they are both the same file. Or is it a browser problem? Or am I thinking wrong?