We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12320
    • 88 Posts
    The last is a folder too, the main one, isn’t it ?

    i checked the code of FirstChildRedirect
    it make redirect this way in last line :
    return $modx->sendRedirect($url);

    replace with :
    return $modx->sendRedirect($url, 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently');


    and give me feedback
      Thanks to the authors of the following code :
      Easy Newsletter (module)
      SiteMap (snippet)
      Codepress (Plugins)
      Strict URLs (Plugins)
      Virtual Aliases (Plugins)
      Maxygallery (snippet)
      • 18367
      • 834 Posts
      Well technically yes.

      It’s obviously the main domain and the homepage.
        Content Creator and Copywriter
        • 12320
        • 88 Posts
        make the modification in my last post
          Thanks to the authors of the following code :
          Easy Newsletter (module)
          SiteMap (snippet)
          Codepress (Plugins)
          Strict URLs (Plugins)
          Virtual Aliases (Plugins)
          Maxygallery (snippet)
          • 18367
          • 834 Posts
          Sorry,

          didn’t see the mods before I replied last time.

          Have done them now, and they have fixed the fixed the two folder redirects but not the index.
          http://makethemclick.com.au/index
          redirected to: http://makethemclick.com.au/
          status code: 302 (object temporarily moved)

          This is like pulling teeth.

          IF I’m reading the .htaccess file right this should not be happening.
            Content Creator and Copywriter
            • 12320
            • 88 Posts
            fix it by an htaccess rule and it will be good.
              Thanks to the authors of the following code :
              Easy Newsletter (module)
              SiteMap (snippet)
              Codepress (Plugins)
              Strict URLs (Plugins)
              Virtual Aliases (Plugins)
              Maxygallery (snippet)
              • 18367
              • 834 Posts
              Sorry but isn’t the htaccess rule already there?
              RewriteCond %{HTTP_HOST} ^makethemclick.com.au/index [NC]
              RewriteRule ^(.*)$ http://makethemclick.com.au/$1 [L,R=301]


              Pardon my ignorance but htaccess still seems like voodoo to me.
              grin

                Content Creator and Copywriter
                • 12320
                • 88 Posts
                i m not an expert in apache rules
                but try something like this at first rewrite rule:
                RewriteRule index$ / [L,R=301]
                  Thanks to the authors of the following code :
                  Easy Newsletter (module)
                  SiteMap (snippet)
                  Codepress (Plugins)
                  Strict URLs (Plugins)
                  Virtual Aliases (Plugins)
                  Maxygallery (snippet)
                  • 18367
                  • 834 Posts
                  Whoa that’s far too brutal.

                  It works but it also directs anything called index anywhere to the homepage.

                  eg ../blog/index also gets redirected.

                  I’m going to call it a night down here..

                  Look at it again in the morning.
                  huh


                    Content Creator and Copywriter
                    • 18367
                    • 834 Posts
                    OK managed to fix it by simply rewriting the actual urls in the templates, which is always a better if slightly more time consuming way to do it.

                    Never could get that final 302 to work properly.

                    As I said I suspect there’s a problem with the host where they make all redirects 302’s

                    Don’t laugh that’s what some of them do.
                    grin
                      Content Creator and Copywriter
                      • 42393
                      • 143 Posts
                      I'd like to see if we can pull together a "latest and greatest" version of this plugin for Revo, and I guess it's only fair to try to do the same for Evo.

                      The code documented in this thread is almost 2 years old. This is now the official package download: Virtual Aliases 1.0.0-rc1, Released Oct 01, 2010 by b03tz
                      But an update by Stan as of 2012-02-21 is less than a year old as of this posting. And yet Stan's version is still 0.0.3. So the more recent code has an older version ID, and people continue to install the older version with the higher version ID.

                      I'm hoping we can tighten this up a little, maybe create a v1.2.x for Revo and v1.1.x for Evo to correspond to MODx versioning. I'm motivated to find a solution because I'm migrating my old site to MODx. I thought the CustomURL addon was what I wanted but it's not. I think Virtual Alias is closer to what I described in this posting.

                      If anyone has an enhancement to this small plugin, perhaps that can be the new baseline.

                      I think the first thing to do is to 'diff' the v1.1.0-rc1 provided by @b03tz with the v0.0.3 provided by Stan. The more functional version becomes the v1.x.1-rc1, with 1.1.1 for Evo and 1.2.1 for Revo. I can diff, but I'm not qualified to determine which is more functional. I'll look over the weekend.

                      With any luck we'll see 1.1.2,3,4 corresponding to 1.2.2,3,4 and someone will create a v2.1.0 and simultaneous 2.2.0. Maybe someone with a clue can advise on that.

                      Ultimately I'd just like to see the package manager version replaced with whatever works the best so that we don't have this weird situation anymore. Then we'll get RTFM up to speed.

                      All of this could just take a couple days with some good feedback. I'll do what I can of course - I'm sort of trying to buy the right solution with my time here. So if you have any code to contribute or insight into this situation, please comment here.

                      Thanks!
                        Loved ModX when I was using it a few years ago. Shifted to WordPress, sorry. Thanks, all.