We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I think you'll need another RewriteCond that grabs the Query string.

    See if this helps: http://stackoverflow.com/questions/7234005/rewritecond-for-url-with-parameters
      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
      • 40092
      • 265 Posts
      Not exactly, this just is a rewrite for a query string. I use that whenever a parameter changes.

      This is a little more shorthanded than i used, so thanks anyway, learned something again:-).

      Below are the rewrite rules i am using on the working (live!) evolution website:

      
      # For Friendly URLs
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      
      RewriteRule ^samepath/(.*)/(.*)\.html$ differentpathtoresource.html?variable=$1&alias=$2 [L]
      RewriteRule ^mailing/(.*)/(.*)\.html$ adifferentpath.html?differentvariable=$1&alias=$2 [L]
      RewriteRule ^path/(.*)\.html$ path.html?variable=$1 [L]
      
      RewriteRule ^(.*)\.html$ index.php?q=$1 [L,QSA]
      
      RewriteRule ^(.*)\.xml$ index.php?q=$1.xml [L,QSA]
      
        • 40092
        • 265 Posts
        Sorry for bumping, but can someone advice on this?

        UPDATE: I was very, very, very stupid. empty var lying around causes a whole lotta problems. [ed. note: thapriest86 last edited this post 13 years, 6 months ago.]