We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50722
    • 35 Posts
    Hello,

    I'm developing a new MODX site at a VPS hosting location which has an already active .htaccess file. This file was generated via CPanel and sets the PHP version and I need to use it.

    When I develop the MODX site I'll need to switch on FURLs and obviously then I'll have two .htaccess files (the CPanel and MODX versions), which I imagine will cause a problem.

    I need to know if I can just safely copy the contents of the CPanel generated .htaccess file into the MODX ht.access file, prior to switching on FURL's.

    Here are the contents of the CPanel generated .htaccess file, which sets the PHP version:

    RewriteOptions inherit
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php56” package as the default “PHP” programming language.
    <IfModule mime_module>
      AddType application/x-httpd-ea-php56 .php .php5 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit

    Can I safely add that to the MODX ht.access file?

    For the record, I'm reaching the site being developed via my hostfile - the DNS hasn't been pointed to the dev site as-yet. (not sure if that makes any difference whatsoever but I mention it here just incase).

    Thanks in advance [ed. note: powellian last edited this post 6 years, 9 months ago.]
      • 50722
      • 35 Posts
      So to answer my own question ... thought I'd brave it and see what happened ... and the answer is ...

      I added the above listed into the MODX ht.access, renamed it to .htaccess, switched on FURLs, nothing broken yet, still have the same PHP version as set from the other CPanel generated .htaccess file.

      So far so good. If it breaks etc I'll write back here.
        • 17301
        • 932 Posts
        Should be fine smiley
          ■ email: [email protected] | ■ website: https://alienbuild.uk

          The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
          • 3749
          • 24,544 Posts
          You probably know this, but it may help others looking here. The ht.access file is an example .htaccess file. It's completely ignored by MODX and by the server.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 50722
            • 35 Posts
            Quote from: BobRay at Jul 08, 2017, 04:28 AM
            You probably know this, but it may help others looking here. The ht.access file is an example .htaccess file. It's completely ignored by MODX and by the server.
            It's ignored until it's renamed to .htaccess when FURLs are activated - right? (which is what I did, after adding the CPanel script)
            Thanks for all replies btw.
              • 3749
              • 24,544 Posts
              Right. smiley

              Although I usually copy it so I'll have the original as a reference.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 50722
                • 35 Posts
                Noted, and thanks for the advice.
                Nothing broken as yet so all good so far...