We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21420
    • 2 Posts
    I am in the process of converting my non CMS site to modx.

    Currently every file on my non cms based website ends in the extension .php regardless of whether it contains php code or not. I would like to keep things this way. However, it seems like I cannot set my files to have the .php extension in MODx Revolution 2.0.7-pl.

    I have added .PHP to the content types area but if I give a resource a PHP content type when I attempt to view it in my browser http://www.forex4noobs.com/cms/forex-pulse.php it results in a downloadable .php

    How can I set my files to .php and have them viewable huh

    I have friendly URL’s on.
      • 21420
      • 2 Posts
      Just a quick update to this issue. It seems that if I set the System > Content Types page if I set the Mime Type for PHP extensions to text/html it works fine, if I set it to text/php it acts as a download. Do I have to set it to text/html or do I need to change something else?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You don’t want your web pages to be served as php types, what you want is to have html type with a URL suffix of .php, which is a different matter altogether. The first tells the server and browser what kind of file it is and this is what is causing the browser to offer it for download, the second is merely part of the name. You can edit a content type and change its default suffix.

        http://rtfm.modx.com//display/revolution20/Content+Types
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org