We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17705
    • 501 Posts
    Hi!

    I have a modx website, in root... and I have a wiki in a /wiki path...
    both of them uses mod_rewrite... so, the wiki do not work ok, and it shows a 404 modx page

    the wiki .htaccess file uses this:

    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.*/[^\./]*[^/])$ $1/
    RewriteRule ^(robots\.txt)$ robots.txt [L]
    RewriteRule ^(favicon\.ico)$ favicon.ico [L]
    RewriteRule ^(.*)$ wakka.php?wakka=$1 [QSA,L]

    and the modx one:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    someone knows how to merge them, to let modx handle all, but no /wiki/SomePageHere urls?

    any idea?


    TIA, and sorry for the bad english smiley
      • 12421
      • 19 Posts
      Hey luuuciano,

      look here: http://forum.modrewrite.com/viewtopic.php?p=13278

      the solution is in the last line, looks smart to me. It uses the regex to exclude the directory ’test’ in their case
      RewriteRule !^(test)(/.*)?$ index.php%{REQUEST_URI} [L]

      applied to the last line in the modx-htaccess for your wiki-thing it should look like
      RewriteRule !^(wiki)(.*)$ index.php?q=$1 [L,QSA]

      In addition use
      RewriteBase /wiki in the wiki-htaccess as mentioned yesterday in the IRC channel.

      This is not a fully integrated version of both rewrite structures but it separetes them and therefore might work. Maybe you have to play around a bit with it and get some more mod_rewrite-knowhow for yourself and then you’ll solve it.

      Rgds, hsquared


      Edit:
      another solution is included here
      http://www.webhostingtalk.com/archive/index.php/t-569392.html
        Usually when things have come so far,
        people tend to disappear.

        MODx Revolution Multi-Domain Installation Tutorial | MODxCMS Webentwicklung Frankfurt Rhein-Main