We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    I just this morning learned that sometimes you need to add
    Option +FollowSymLinks

    to the .htaccess file before starting the rewrite engine.

    http://corz.org/serv/tricks/htaccess2.php
      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
      • 10076
      • 1,024 Posts
      My ISP wont turn on the mod_rewrite, will I be able to use FURL at all?
        • 25663 MODX Staff
        • 12,272 Posts
        Not without switching to a more reasonable host.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 10076
          • 1,024 Posts
          think it s the only option, cause another website I run with them is app on another server and there ’register_globals` is set to `ON` and they refuse to change that too.
          Thanks anway.
            • 37550 ☆ A M B ☆
            • 711 Posts
            Hmm doesnt sound like a good host to me register_globals should be off, seems crazy not allowing the mod rewrite either sad
              http://www.onesmarthost.co.uk
              UK MODX Hosting with love.
              • 28453
              • 2 Posts
              Hi,

              i have a Problem with mod_rewrite ....

              If i type in an URL like domain.com/folder/file.php the browser doesn’t do anything except loading and loading and after this the site is unavailable for some minutes. (this file does not exist and an 404 should happen)

              when i type in domain.com/folder/ the 404 is given

              can anyone reproduce this error or have an idea to fix this?

              greets
                • 19986
                • 90 Posts
                Sounds like an infinate redirect/rewrite, which means that the URL is being rewritten, then the new one is matched and is rewritten again, then the new new one is matched and rewritten again, etc etc.

                Of course, your host may not support mod_rewrite.

                Try preceeding your rewrite rule with a condition that checks whether it’s already been rewritten. For example, the following rule only rewrites the URL if it’s not already been rewritten to /modx/index.php.

                RewriteCond %{REQUEST_URI} !^/modx/index.php
                RewriteRule ^(.*) /modx/index.php?q=$1 [QSA,PT,L]


                Saying that, you’ve not given enough details for me to give a full answer... Are you using the standard modx rules? Do you have friendly URLs on? What are your rewrite rules?
                  • 26693
                  • 23 Posts
                  In order to get FURL’s to work for me I had to conditionally write

                  <Directory path/to/my/modx/base/>
                  AllowOverride All
                  </Directory>
                  


                  into my vhost.conf (which is linked into httpd.conf)

                  Don’t know if anyone else will need that but its something to try out if you are having issues.
                    • 12652
                    • 228 Posts
                    Has anyone figured out how to, assuming it will probably require mod_rewrite to do, get the home page to come up like this:

                    mydomain.com or mydomain.com/

                    rather than

                    mydomain.com/index.htm

                    (assuming your’ve named the page index and added the htm suffix)

                    Reason being to push as much SE weight through the domain.

                    The SEs see

                    www.mydomain.com
                    mydomain.com
                    mydomain.com/index.htm

                    really as three different pages, therefore, internal and external links are being divided up instead of consolidated.

                    Hardcoded links would work, but that isn’t practical when you factor in using Wayfinder or other snippets for navigation.
                      | Identity Developments delivers SEO focused web design and web presence services
                      - it&#39;s not about websites, it&#39;s about your identity. |
                      • 19986
                      • 90 Posts
                      If you’re using the modx rewrite rules with friendly URLs, this should already happen - whatever follows the domain name is passed through to index.php as the q parameter, so if nothing follows the domain name then index.php?q= will be passed through and modx will show the default page.

                      If that’s not working, try adding this rule to pass index.htm through when no page is requested:

                      RewriteRule ^/$ /index.htm [PT]


                      Looks to me like this topic is turning into a general mod_rewrite one.

                      This discussion is closed to further replies. Keep calm and carry on.