The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php website not working and always opens like a download

Discussion in 'General Discussion' started by aiymkaiy, Jul 3, 2011.

  1. aiymkaiy

    aiymkaiy Registered

    Joined:
    Jul 3, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello!
    I have recently uploaded my new pages with .php and changed the .htaccess to .html and .htm but still I am unable to visit or preview my website which is now in php. Can anybody suggest what to do to visit and preview my .php website as normal html website. Thanks
     
  2. Kristian0911

    Kristian0911 Member

    Joined:
    Jan 17, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Use the following code in .htaccess file :

    Code:
    AddHandler application/x-httpd-php .html .htm 
    And try to access the link.

    Thanks :)
     
  3. aiymkaiy

    aiymkaiy Registered

    Joined:
    Jul 3, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thank Chris!
    It worked fine as you suggested, but when I did that earlier, id did not. Thanks for your help.
     
  4. goldy_rocky

    goldy_rocky Member

    Joined:
    Jul 16, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks That did the trick for me
     
Loading...

Share This Page