+ Reply to Thread
Results 1 to 7 of 7

Thread: Problems with Apache parsing html as php

  1. #1
    hezuo's Avatar
    hezuo is offline x10 Sophmore hezuo is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Huascar, Santa Anita
    Posts
    174

    Question Problems with Apache parsing html as php

    Hi guys,
    I've been using this code to parse html as php (so php code can load in html pages)
    this is how my .htaccess looks like

    HTML Code:
    AddType application/x-httpd-phpv2 .htm .html 
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /cesarpcriot/blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /cesarpcriot/blog/index.php [L]
    </IfModule>
    the ifmodule is added automatically by wordpress, but it used to work perfectly until a week ago. now, when i try to open my index.html file, the browser tries to download the file rather than showing it. Please gimme a hand. By the way, my site is http://cesarjosue.pcriot.com

  2. #2
    nightscream is offline x10 Lieutenant nightscream is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Hallaar, Belgium
    Posts
    474

    Re: Problems with Apache parsing html as php

    what about just add this to htacces
    AddType application/x-httpd-php .php .htm .html
    ------------------------------------------------------------------------------------------
    If you have any troubles with a website or a script, just send me a pm.

    I also code websites in xHTML/css, can code javascript and php too if needed

  3. #3
    hezuo's Avatar
    hezuo is offline x10 Sophmore hezuo is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Huascar, Santa Anita
    Posts
    174

    Re: Problems with Apache parsing html as php

    Thanks, nightscream, I've tried that; unfortunately, it doesn't work either. Is there anything else I can do? Thanks for your he help

  4. #4
    nightscream is offline x10 Lieutenant nightscream is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Hallaar, Belgium
    Posts
    474

    Re: Problems with Apache parsing html as php

    what about, delete your old htaccess, create a new one and add this

    AddType application/x-httpd-php .php .htm .html
    AddHandler x-httpd-php .php .htm .html

    Then upload the new one.
    Last edited by nightscream; 01-25-2009 at 03:59 PM.
    ------------------------------------------------------------------------------------------
    If you have any troubles with a website or a script, just send me a pm.

    I also code websites in xHTML/css, can code javascript and php too if needed

  5. #5
    hezuo's Avatar
    hezuo is offline x10 Sophmore hezuo is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Huascar, Santa Anita
    Posts
    174

    Re: Problems with Apache parsing html as php

    Unfortunately, the same thing happens. Do you think it can be a server problem?

  6. #6
    nightscream is offline x10 Lieutenant nightscream is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Hallaar, Belgium
    Posts
    474

    Re: Problems with Apache parsing html as php

    could be.. Cause I only use those 2 commands and they always worked up to now.
    ------------------------------------------------------------------------------------------
    If you have any troubles with a website or a script, just send me a pm.

    I also code websites in xHTML/css, can code javascript and php too if needed

  7. #7
    ashwinsinha's Avatar
    ashwinsinha is offline x10 Lieutenant ashwinsinha is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Noida, Uttar Pradesh, India
    Posts
    278

    Re: Problems with Apache parsing html as php

    When I Add This To My Htaccess,
    AddType application/x-httpd-php .php .htm .html
    AddHandler x-httpd-php .php .htm .html
    PHP files don't work !!


+ Reply to Thread

Similar Threads

  1. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  2. Corriendo una funcion de php en file html
    By oregonsv in forum Ayuda Web
    Replies: 11
    Last Post: 10-28-2008, 01:19 PM
  3. Problems with PHP?
    By Sup3rkirby in forum Free Hosting
    Replies: 4
    Last Post: 08-05-2008, 12:30 AM
  4. Problems with PHP Mail
    By Jarryd in forum Free Hosting
    Replies: 4
    Last Post: 11-26-2007, 09:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers