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

    I’ve got FURLs switched on and when I installed the demo site that comes with MODX some of the links come up with the following 403 error;


    403 Error - Forbidden
    You don’t have permission to access /index.php on this server.

    I’ve reduced the rewrite rules to this, but I am still getting the 403 problem;

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    


    Is there an issue with file permissions or something I’ve done wrong?

    With thanks.
      • 21257 MODX Staff
      • 730 Posts
      Is this a local webserver that you’ve copied the MODx files to, or is it a hosting environment where you’ve FTP’d the files to? (Or other?)
      What are the permissions on that index.php file set to?
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 32645
        • 377 Posts
        It is a web server, and not local.

        The permissions for index.php are: 655. I’ve tried changing them to 777 - but still get a 403 error.

        If I remove the HTaccess file and switch off FURLs, it seems to be okay - but that is because it is using the index.php?id=X

        I’m going to look at this further - perhaps even re-uploading some key files and check user permissions as it is quite confusing as to why it is happening.
          • 32645
          • 377 Posts
          Hi there.

          I’ve now figured out the problem!

          The problem was that I am currently programming the MODX website on an IP address with a username attatched (ie: http://ipaddress/~username) and not an actual website address, so every reference to the RewriteBase to / was going to the wrong path!

          I don’t know why it was happening, but I’ve solved it now.

          So, in summary - if your developing/programming a MODX site on an IP address be sure to include the username on a HTaccess RewriteBase.

          Phew.

          With thanks.

          *closed*