RUN PHP from HTML Files = ModRewrite

Discussion in 'PHP' started by redhits, Feb 25, 2008.

  1. #1
    Does anybody known how i can insert php code into .html files?


    what should i change in the .htaccess so it will eval some php code that is in html files?

    can i set-up the php-rewrite mode only for 1 single html page?!

    i have an file xxx.html that really,really need to remain xxx.html , not changed to xxx.php
     
    redhits, Feb 25, 2008 IP
  2. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #2
    try adding this to your htaccess

    AddType application/x-httpd-php .html

    If it is only one page:

    <Files yourpagename.html> AddType application/x-httpd-php .html </Files>
     
    mjewel, Feb 25, 2008 IP
  3. redhits

    redhits Notable Member

    Messages:
    3,023
    Likes Received:
    277
    Best Answers:
    0
    Trophy Points:
    255
    #3
    <Files yourpagename.html> AddType application/x-httpd-php .html </Files>
    this ones not working in general ? or not working on windows?!
     
    redhits, Feb 25, 2008 IP
  4. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Did you replace 'yourpagename.html' with your page name?
     
    zerxer, Feb 25, 2008 IP
  5. Im The ONE

    Im The ONE Peon

    Messages:
    800
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Im The ONE, Feb 25, 2008 IP