We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1932
    • 137 Posts
    This is an auto-generated support/comment thread for SEO Strict URLs.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Enforces the use of unique document URLs to prevent duplicate content.
      • 1932
      • 137 Posts
      By the way, to enforce the www on URLs, users can use the following mod_rewrite rule with the Apache webserver:

      # Include the following in your .htaccess file
      # Replace "example.com" &  "example\.com" with your domain info
      RewriteCond %{HTTP_HOST} .
      RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
      RewriteRule (.*) http://www.example.com/$1 [R=301,L]
      


      To enforce URLs without the www, simply remove all references of www. in the htaccess rule:

      # Include the following in your .htaccess file
      # Replace "example.com" &  "example\.com" with your domain info
      RewriteCond %{HTTP_HOST} .
      RewriteCond %{HTTP_HOST} !^example\.com [NC]
      RewriteRule (.*) http://example.com/$1 [R=301,L]
      


      Original SEO Strict URL thread: http://modxcms.com/forums/index.php/topic,7346.0.html

      More information on htaccess rewriting and friendly URL’s can be found at: http://wiki.modxcms.com/index.php/Friendly_URLs_Guide
        • 12652
        • 228 Posts
        This is beyond sweet!! Thanks.

        Just installed and getting familiar with, though doesn’t seem like much to do, which is even better.

        Am running into an issue with the TvTagCloud which passes the tag parameters as:
        www.mydomain.com/info.htm&tags=sometag


        Any recommendations on a solution?
          | Identity Developments delivers SEO focused web design and web presence services
          - it's not about websites, it's about your identity. |
          • 1932
          • 137 Posts
          Hmm, I don’t understand why TV tag cloud formats the URL as they do, I’m not even sure that it’s valid. If possible, try formatting the URL as:

          www.mydomain.com/info.htm?tags=sometag
            • 12652
            • 228 Posts
            Okay, I’m assuming I need to dig into their code... not a strong suite, but I think I can manage. I’ll let you know.

            Another question. I have the xml sitemap snippet and I read in the development thread that this avoids the sitemap.xml.htm issue, which I’m doubly thrilled about... but not sure how to get the TV override to do that since it is setup on a (blank) template. Do I need to create a specific template now but leave it blank and assign the override TV to it???



            EDIT: Making the change in the TvTagCloud worked.
              | Identity Developments delivers SEO focused web design and web presence services
              - it's not about websites, it's about your identity. |
              • 1932
              • 137 Posts
              Yup, you will have to create a "blank" template and assign the custom TV to it.

              The template code will be blank except for the main content:

              [*content*]
                • 12652
                • 228 Posts
                I must be doing something wrong, I’m sure.

                I setup a new template called Empty.
                Placed [*content*] in it.
                My sitemap page is set to use that template and is empty except for the sitemap snippet call.
                I then set the override TV to Base Name.

                Never mind, just realized that I also need to set the plugin configuration to allow manual overrides. Now it works.

                grin grin grin

                This rocks!

                cheers
                  | Identity Developments delivers SEO focused web design and web presence services
                  - it's not about websites, it's about your identity. |
                  • 1932
                  • 137 Posts
                  Awesome, I’m glad it’s working laugh
                    • 27376
                    • 576 Posts
                    Quote from: ApoXX at Mar 10, 2007, 07:01 PM

                    Yup, you will have to create a "blank" template and assign the custom TV to it.

                    The template code will be blank except for the main content:

                    [*content*]
                    Alternatively, if you know MySQL queries, you can sort of "Hack" the automatic blank template to hold this TV in two steps:

                    • Open up [tt][PREFIX]site_tmplvars[/tt] and remember the id of your seoOverride TV
                    • Run this query: [tt]INSERT INTO [PREFIX]site_tmplvar_templates (tmplvarid, templateid) VALUES ( [id], 0 );[/tt]
                    Of course, replace [id] with the id of your TV and [PREFIX] with your MODX db prefix. If you don’t know MYSQL or how to do the instructions above, just go with ApoXX’s method, it’s easier. This method just produces less clutter in the templates. There’s no other advantages.

                    Have fun! Only tested on MODx 0.9.5 - 0.9.6
                      • 1932
                      • 137 Posts
                      Thanks for the tip Sirlancelot.