Web Design Forum: BlueSky - Viewing Profile - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting

BlueSky's Profile User Rating: -----

Reputation: 0 Neutral
Group:
Members
Active Posts:
100 (0.07 per day)
Joined:
10-September 08
Profile Views:
2,181
Last Active:
User is offline Dec 27 2011 02:02 PM
Currently:
Offline

My Information

Member Title:
Dedicated Member
Age:
39 years old
Birthday:
December 10, 1972
Gender:
Female Female
Location:
An island somewhere under the sun and blue skies
Interests:
Loooots of things...serious, light, useful, unuseful...

Contact Information

E-mail:
Private

Users Experience

Experience:
Intermediate
Area of Expertise:
I'm Learning

Latest Visitors

Topics I've Started

  1. php include inside html.file + extensions question

    17 October 2011 - 01:00 PM

    The title of ths topic was hard to find...
    Several problems, several questions but 1 Goal:

    I have 20 pages and some updates are hard to follow as my site grows ( ie : menu).
    So, I extracted my menu and put it into another file and saved it apart as topnav.html in folder "includes"
    To call now my menu into all my .html files I inserted the following :
    <div id="header">
    <?php include('includes/topnav.html'); ?>
    </div>

    To be able to parse the php include I input the following in my htaccess file which look like that now ( note : my site runs with Apache CGI / Php5
    RewriteEngine on 
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ 
    RewriteRule ^index\.html$ http://mysite.com/ [R=301,L] 
    AddHandler application/x-httpd-php .htm .html #THIS IS THE CODE I FOUND EVERYWHERE ON THE WEB TO ALLOW MY PHP TO BE PARSED.
    # Error Pages
    ErrorDocument 404 /index.html
    #Other rules blahblah...
    


    So far no luck.
    If I try to change my extension to .php it works, but I do not want to do so, as it will hurt my SEO.

    What do i do wrong ?
    I've previously asked to my provider and he told me to use the addHandler instead of addType directive.

    On the other hand, I also found in my researches on the web, that taking out all file extension is the best right now.
    so that files look like www.mysite.com/the-story instead of www.site.com/the-story.html

    To sum-up:
    How can I use php include in all my html files and remove all file extensions and how ?

    I hope my question(s) won't be too messy ...
    THANK you very much.
    I have spent 2 days on this. I am stumped. <_<

Comments

BlueSky has no profile comments yet. Why not say hello?