We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40359
    • 25 Posts
    Did anyone noticed that Friendly URLs starting with 'ba' are not working? Page is redirected to home... :/
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      ?? Can't say that I have; what exactly is the alias causing the problem?
        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
        • 40359
        • 25 Posts
        Every alias starting with 'ba', for example, babanovac, banja, battler, bandicot...
          • 42046
          • 436 Posts
          Quote from: bsehovac at Aug 08, 2013, 03:58 PM
          Every alias starting with 'ba', for example, babanovac, banja, battler, bandicot...

          Works fine for me. Are you using any non-standard rewrite access code?
            • 40359
            • 25 Posts
            No, standard modx htaccess, maybe because of domain on my sites, it is .ba? For example: www.vlasic.ba, every aliases are working except when they are starting with ba: www.vlasic.ba/bandicot
              • 42046
              • 436 Posts
              I would start by setting up a custom 404 page, at moment it's hard to tell if it's 404ing or actually redirecting to the homepage.
                • 3749
                • 24,544 Posts
                I don't see anything in the MODX .htaccess file or in the request handler that would do that.
                I wonder if your host has an .htaccess file (higher up in the tree) or some configuration setting that's modifying the URL.

                Do you have any SEO plugins installed?

                What happens if you turn FURLs off?
                  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
                  • 40359
                  • 25 Posts
                  Actually, I have Babel installed on this websites, and different FURLs part in it:

                  # The Friendly URLs part
                  # redirect all requests to /en/favicon.ico
                  # to /favicon.ico
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteRule ^(ba|en)/favicon.ico$ favicon.ico [L,QSA]
                     
                  # redirect all requests to /en/assets* to /assets*
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteRule ^(ba|en)/assets(.*)$ assets$2 [L,QSA]
                  
                  # redirect all other requests to /en/*
                  # to index.php and set the cultureKey parameter
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^(ba|en)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]


                  Could this rewrite rules result to this redirect?
                    • 6437
                    • 157 Posts
                    It looks like the (ba|en) reference is acting as a greedy regex - sorry I hate regex so can't offer a solution but http://regexpal.com may help.

                    Steve
                      • 3749
                      • 24,544 Posts
                      Ah. Babel is definitely the problem.

                      I think it might work if you change the refs in the rewrite rules to:

                      (\.ba|\.en)


                      Be sure to back up the file first.
                        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