We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32950
    • 23 Posts
    Hi peeps,
    had a few issues with a new site over the last couple of days (not modX related) but it related to nameserver settings - while I was working with the name rego company I was checking out my bookmarks of client sites - I always use friendly url’s and upload the htaccess file supplied in the modX download - now in some of the site managers when I preview site it goes to ’http://www.sitename.co.nz’ and the internal page links show for their destination and in others it goes to ’http://sitename’ with no www ? what have I done here? any ideas - Cheers AL
      • 16702 ☆ A M B ☆
      • 536 Posts
      your topic is not for here, but the answer is in .htaccess:
      Options +FollowSymLinks 
      RewriteEngine on 
      RewriteCond %{HTTP_HOST} ^domain.com [NC] 
      RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
      

        palma non sine pulvere
        • 32950
        • 23 Posts
        Cheers - where is my topic for?, I’ve read the link at the top of the htaccess file but it doesn’t cover this. As I said same .htaccess file used for all sites.
          • 16702 ☆ A M B ☆
          • 536 Posts
          Quote from: X at Jul 14, 2010, 02:47 AM

          Cheers - where is my topic for?, I’ve read the link at the top of the htaccess file but it doesn’t cover this. As I said same .htaccess file used for all sites.

          maybe for "Webworker Lounge" whatever, important is successfully resolve...
            palma non sine pulvere
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            I always use htaccess to either rewrite links to www.sitename.com or sitename.com (without the www) to prevent weird issues..

            At some time I spent hours trying to figure out why an AJAX request wasn’t returning any information (while the script did trigger), this turned out to be related to whether www was included or not. AJAX can’t be used cross-domain, and "www.sitename.com" isn’t the same domain as "sitename.com" apparently.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 16702 ☆ A M B ☆
              • 536 Posts
              Quote from: Mark at Jul 14, 2010, 05:12 AM

              ....
              At some time I spent hours trying to figure out why an AJAX request wasn’t returning any information (while the script did trigger), this turned out to be related to whether www was included or not. AJAX can’t be used cross-domain, and "www.sitename.com" isn’t the same domain as "sitename.com" apparently.

              what you thing about this:
              http://www.ajax-cross-domain.com/
                palma non sine pulvere
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                Quote from: Kristalin at Jul 14, 2010, 05:15 AM

                Quote from: Mark at Jul 14, 2010, 05:12 AM

                ....

                what you thing about this:
                http://www.ajax-cross-domain.com/

                That.... is fancy :d

                Edit: And expensive, € 55 for a single user license o.O
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 3749
                  • 24,544 Posts
                    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
                    • 5387
                    • 15 Posts
                    The real reason you want to do a redirect is for SEO.

                    Search engines consider www.xxx.com and xxx.com two different websites and therefor if someone links to version 1 and someone else links to version 2 you have have 1 link instead of 1+1 as if you had done a redirect.

                    Mui Importante!
                      Chris Kluis, MBA, MSE
                      Director of Marketing
                      Mintek Mobile Data Solutions
                      EAM & CMMS Software
                      EAM & CMMS Blog
                      • 29089
                      • 13 Posts
                      Chrome 6 strips all http:// and www information now, thank christ! Stupid WWW.