We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3654
    • 3 Posts
    (For posterity... this is the only thread I’ve seen in searches about Zeus servers!)

    I’ve edited the last bit of Qodo’s script so it handles additional query strings (like for getPage).

    match URL into $ with ^/([^?]*)\??(.*)
    if matched  
        set URL = /index.php?q=$1&$2
        goto END
    endif
    


    Hope this saves someone’s day like Qodo’s script saved mine!
      • 37421
      • 1 Posts
      Qodo's code works also with MODx Evolution on names.co.uk servers.

      Well, almost. If you are using Ditto with pagination, next and prev links won't work. You need to create templates:

      &tplPaginateNext:
      <a href="[~[*id*]~]&start=[+stop+]">


      &tplPaginatePrev
      <a href="javascript: history.go(-1)">


      This idea seems to work.

      And if you keep your website in a directory, let's say 'modx', just edit the last part of his code:

      match URL into $ with ^/modx/(.*)$
      if matched 
      set URL = /modx/index.php?q=$1
      goto END
      endif


      File rewrite.script place in the main 'web' directory on the server.
        • 37042
        • 384 Posts
        Thanks for the update Qodo.

        Can someone clarify something regarding this script.
        I presume I need to place this in the root in a file called rewrite.script and swap any instances of DOMAIN for my actual domain?

        I'm having a problem on a Zeus server (running revo 2.2.) where my URL becomes a huge url repeating the domain about 50 times. Almost like it's caught in some loop.
        I have friendly URLs turned on in the revo control panel.

        Any help gratefull accepted.
        Thanks
          ...
          • 9439
          • 90 Posts
          You've probably fixed this by now, but I thought I'd post anyway since I also have just taken over a site with a Zeus server. The code on page 1 works fine except for the www redirect. It generated a huge URL for me also. Try using this instead, which I got from the namesco website:

          match IN:Host into $ with ^domain\.co\.uk$
          if matched
          match URL into $ with ^/(.*)$
          if matched
          set OUT:Location = http://www.domain.co.uk/$1
          set OUT:Content-Type = text/html
          set RESPONSE = 301
          set BODY = Moved
          endif
          endif

          I also have an integrated Wordpress blog on the site, which wasn't rendering properly after I'd migrated it to Revo. However simply adding the wp-admin to the excluded filelist sorted it.

          match URL into $ with (/manager/|/core/|/connectors/|/assets/|/wp-admin/)
            David Heriot
            pfsmedia
            • 37825
            • 14 Posts
            This is also needed:

            # Ignore anything to do with manager
            match URL into $ with (/manager/|/core/|/connectors/|/assets/)
            if matched
            goto END
            endif
              • 37746
              • 42 Posts
              Thanks to all involved with this thread. You have just saved my life!
                • 14167
                • 55 Posts
                Thanks to all for the code, but I'm also using articles and the tags, but at the moment the link domain.com/blog/tags/tag/ is just taking me to the homepage.

                What would I need to add to rewrite.script to make this work?
                  Linux, PHP 5.2, MySQL 5.0, Revo 2.2.0-pl2