title: My Website www.codebox.co.nz downloads the index.php file instead of displaying the site
body: <p>Hey everyone hope all is well!
  my site www.codebox.co.nz seems to be downloading the index.php instead of displaying the site.</p>
  
  <p>long story short i have build up a website which has a folder in the root directory called "inc" inside this folder I have header.php and footer.php. every time I visit my site <a href="http://www.codebox.co.nz/" rel="nofollow noreferrer">http://www.codebox.co.nz/</a> the index.php downloads and I cannot figure out why :( - inside my <code>.htaccess</code> the file I have this code.</p>
  
  <pre><code>RewriteEngine on
  
  RewriteRule ^(.*)\.html$ $1.php [nc]
  
  AddHandler php5-script .php .html .htm
  </code></pre>
  
  <p>The site has subfolders with other .php pages in it, all I'm trying to do is use site relative PHP so the header and footer.php are included on all pages regardless of what sub dir. the .php pages the are in! </p>
  
  <p>I'm really lost on this one, I have contacted my hosting provider but they keep telling me to check my PHP code?</p>
  
  <p>I have a feeling it's my <code>.htacccess</code> file.</p>
  
  <p>The code in this file is there so .php outputs as .html as per request of the client.</p>
  
  <p>Any info you could give me would be fantastic.</p>
  
  <pre><code>                &lt;?php 
                 $path = $_SERVER['DOCUMENT_ROOT'];
                 $path .= "/inc/header.php";
                 include_once($path);
              ?&gt;
  
              &lt;div class="pageTopic"&gt;
                &lt;h1&gt;Welcome to Aaron Whiteman Monumental Masonry&lt;/h1&gt;
              &lt;/div&gt;
  
              &lt;div id="myCarousel" class="carousel slide carousel-fade" data-ride="carousel" data-interval="5000"&gt;
                &lt;!-- Indicators --&gt;
                &lt;ol class="carousel-indicators"&gt;
                  &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt;&lt;/li&gt;
                  &lt;li data-target="#myCarousel" data-slide-to="1"&gt;&lt;/li&gt;
                  &lt;li data-target="#myCarousel" data-slide-to="2"&gt;&lt;/li&gt;
                &lt;/ol&gt;
  
                &lt;!-- Wrapper for slides --&gt;
                &lt;div class="carousel-inner"&gt;
                  &lt;div class="item active"&gt;
                    &lt;img src="slideshowPics/slideshow1.jpg" alt="Aaron Whiteman Monumental Masonry"&gt;
                  &lt;/div&gt;
  
                  &lt;div class="item"&gt;
                    &lt;img src="slideshowPics/slideshow2.jpg" alt="Aaron Whiteman Monumental Masonry"&gt;
                  &lt;/div&gt;
  
                  &lt;div class="item"&gt;
                    &lt;img src="slideshowPics/slideshow3.jpg" alt="Aaron Whiteman Monumental Masonry"&gt;
                  &lt;/div&gt;
  
  
                  &lt;div class="item"&gt;
                    &lt;img src="slideshowPics/slideshow4.jpg" alt="Aaron Whiteman Monumental Masonry"&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
  
                &lt;!-- Left and right controls --&gt;
                &lt;a class="left carousel-control" href="#myCarousel" data-slide="prev"&gt;
                  &lt;span class="glyphicon glyphicon-chevron-left"&gt;&lt;/span&gt;
                  &lt;span class="sr-only"&gt;Previous&lt;/span&gt;
                &lt;/a&gt;
                &lt;a class="right carousel-control" href="#myCarousel" data-slide="next"&gt;
                  &lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;
                  &lt;span class="sr-only"&gt;Next&lt;/span&gt;
                &lt;/a&gt;
              &lt;/div&gt;
  
              &lt;section class="light"&gt;
                &lt;div class="row"&gt;
                  &lt;div class="col-lg-12"&gt;
                    &lt;p&gt;A memorial set in stone is a lasting way to pay respect to a loved one.&lt;/p&gt;
                    &lt;p&gt;Working with families to create permanent memorials is our core business. Since 2003 we have been providing monumental masonry services to the Wellington region, and have gained an excellent reputation for our craftsmanship, innovation and attention to detail.&lt;/p&gt;
                    &lt;p&gt;We create both traditional gravestones and innovative new memorials at our Upper Hutt premises. Also, we offer a full restoration and refurbishment service for graves, plaques and headstones. Using traditional techniques combined with the latest technology, we can tailor our services to meet your requirements, creating everlasting memorials that will stand the test of time.&lt;/p&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/section&gt;
  
              &lt;?php 
                 $path = $_SERVER['DOCUMENT_ROOT'];
                 $path .= "/inc/footer.php";
                 include_once($path);
              ?&gt;
  </code></pre>