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

    I am new to MODx and trying to get friendly urls to work, but when I add the .htaccess to my webfolder it causes a 500 internal server error.

    linux
    Apache 2.0.52
    php 4.3.9
    mySql 5.0.27
    MODx 0.9.6.1p2

    My .htaccess is the standard one - looks like this:

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


    Everything else in there is commented out.

    MODx is in a subfolder named modx.

    In the manager->tools->conf->friendly urls:
    use friendly urls: yes
    prefix: (blank)
    suffix: .html
    use friendly alias: yes
    alias path: no
    duplicate aliases: no
    generate alias: no

    What can be wrong here? huh

    Really a great CMS if only I could get the SEO-part to work...without it I might as well switch back to joomla. Had a sleepless night trying to figure this out.

    Thanks in advance.

    Line
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Does your root / already have a .htaccess file in it?
        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
        • 17182
        • 5 Posts
        Hi Sottwell

        no it doesn’t.

        Line
          • 4310
          • 2,310 Posts
          Where are you putting the .htaccess file, in the root folder or modx folder?
          If in the root folder I think it should read
          RewriteBase /modx

          Or in the modx folder
          RewriteBase /


          EDIT please ignore
            • 17182
            • 5 Posts
            Hi Bunk58

            I don’t think that is correct. It says in the htaccess:

            # Make sure RewriteBase points to the directory where you installed MODx.
            # E.g., "/modx" if your installation is in a "modx" subdirectory.


            So I think I did it right. But I will give it a try.

            Line
              • 7231
              • 4,205 Posts
              Does your host support mod rewrite?

              Your mod_rewrite is probably not working and/or .htaccess overrides is not enabled.
              Have your host confirm that you can in fact use .htaccess overrides, and that mod_rewrite is enabled.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 17182
                • 5 Posts
                Hi Bunk58: I’ve tried every possible combination of ’/’ and ’/modx’ putting the htaccess in the /modx folder and the root : Same Internal error. Without the htaccess everything works fine.

                Hi dev_cw: My host do support mod_rewrites and htaccess override.. So I really don’t where to look for the solution.

                Thanks

                Line
                  • 17182
                  • 5 Posts
                  Thank you all for your suggestions smiley

                  I installed a local modx using xampp, and it didn’t work, so I checked my httpd.conf to see if dev_cw was right afterall, and he/she was! Great - thanks laugh mod_rewrite wasn’t enabled afterall, so now I think maybe it’s the same with my host.

                  Again thanks -

                  Line