Question: I had this setup:

```
images
    image1.jpg
    image2.jpg
header.html
about
    index.php
    image3.jpg

```

But going to MyWebsite.com/About gave it an extra slash on the end. I decided to go with the solution of creating a file called about in my home directory:

```
images
    image1.jpg
    image2.jpg
header.html
about
aboutfiles
    image3.jpg

```

The problem is that now this file won't let me use .php:

```
<?php include('header.html');?>

```

It's not showing the header file. What can I do to make this work?

Answer: 
Your problem is that your web server does not recognize the filename "about" as a php document. You have three options

1. Use a ".php" extension on your page document, such as "index.php" which will run your php scripting.
2. Install a solution such as mod\_rewrite that will translate urls such as /about to a file actual like "about.php".
3. Adjust your servers mime-type for php documents. Learn more about MIME types here. <https://developer.mozilla.org/en-US/docs/Properly_Configuring_Server_MIME_Types>

The first solution is the simplest and easiest, in any document you use PHP, the extension should be .php
If you edit your virtualhost directive in your apache conf file, you can add the following:

```
DefaultType application/x-httpd-php 

```

This will tell apache to send web paths that do not end in an extension to render using the php engine.

Therefore, /about would act as if it was about.php. Another potentially more useful approach is to name the file about.php on the server, and allow referencing it without the .php in the url. For this, you would configure it the opposite way.

```
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^(([^/]+/)*[^.]+)$ /$1.php [L]

```