We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38466
    • 13 Posts
    htaccess is now:

    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments
    # and especially for the first three commented out rules

    #php_flag register_globals Off
    #AddDefaultCharset utf-8
    #php_value date.timezone Europe/Moscow

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /

    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]

    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    # Exclude /assets and /manager directories and images from rewrite rules
    RewriteRule ^(manager|assets)/*$ - [L]
    RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5
      • 5340
      • 1,624 Posts
      If it does't work I suspect a server problem. Maybe you apache install is missing the part that makes the urls friendly. Maybe someone else knows which one it is.
        • 38466
        • 13 Posts
        I have url friendly, but not friendly are accesible too :-(
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That URL will indeed work, but I can't imagine how Google got a hold of it.

          You can also access your pages with the non-friendly index.php?id=xxx, but again I don't see where Google (or any other bot) would ever get such an address.
            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
            • 16278
            • 928 Posts
            Did you perhaps start your site without Friendly URLs, so that Google indexed the unfriendly version and has stuck with it ever since?

            If you use Google Webmaster tools, there are ways you can tell them which version of the URL you'd prefer to be indexed. Possibly just submitting a sitemap with your preferred URLs would do the trick.

            :) KP
              • 38466
              • 13 Posts
              I think that it was problem with Filezilla and Notepad+. Content in htaccess was ok, but not worked after uploading.
              You have right. GWT is my last chance. I don't have idea fo redirect 301. Nothing work corectly ;-/