We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]

    I think this part of MODx’s main .htaccess file is creating issue on my MyBB install.

    URL’s like...

    http://symphonicheaven.com/forum/admin/index.php?module=home/preferences

    ...are getting redirected to my MODx-created 404 error page. Since my URL’s on MODx are like /nds/hearts instead of something like /nds/hearts.php, would that cause an issue with the MyBB link above?

    This is a major issue for me, since I can’t do anything in MyBB’s AdminCP right now. x_x
      My Snippets
      -> PopUpChunk v1.0
      • 33372
      • 1,611 Posts
      Just copy the .htaccess file from the MODx Manager subdirectory to your forum subdirectory to turn off mod_rewrite for URLs in there.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 28033
        • 925 Posts
        Quote from: ZAP at Nov 04, 2008, 09:14 PM

        Just copy the .htaccess file from the MODx Manager subdirectory to your forum subdirectory to turn off mod_rewrite for URLs in there.

        Since there’s already rewrite lines in the one in MyBB to create SEO friendly URL’s, would that create an issue if I "merged" them? Or could I just copy it over to only the /admin directory, since that’s where the issue lies?
          My Snippets
          -> PopUpChunk v1.0
          • 33372
          • 1,611 Posts
          If the problem is only in the admin subdirectory, then the easiest thing is just to copy the .htaccess file that turns off rewrites into there. I find that it’s definitely easier to manage rewrite rules all in one place, so if you want to merge the two you could leave it at the root of your website and make sure that you put "forum/" in the ones that you need for MyBB. I think that you can also turn rewrites off at the beginning of your MyBB .htaccess file and then turn them on again right afterwards and that will cancel out the rules from the root .htaccess file, but I’m not positive.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 28033
            • 925 Posts
            Here’s the MODx one in the "root"...

            Options +FollowSymlinks
            RewriteEngine On
            RewriteBase /

            # The Friendly URLs part
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
            RewriteRule ^(.*)\.png2$ $1off.png [nc]

            # Rewrite www.domain.com -> domain.com
            RewriteCond %{HTTP_HOST} .
            RewriteCond %{HTTP_HOST} !^symphonicheaven\.com
            RewriteRule (.*) http://symphonicheaven.com/$1 [R=301,L]

            ...and the one in /forum, for MyBB...

            Options -MultiViews +FollowSymlinks -Indexes

            #
            # If mod_security is enabled, attempt to disable it.
            # - Note, this will work on the majority of hosts but on
            # MediaTemple, it is known to cause random Internal Server
            # errors. For MediaTemple, please remove the block below
            #
            <IfModule mod_security.c>
            # Turn off mod_security filtering.


            # The below probably isn’t needed, but better safe than sorry.

            </IfModule>

            #
            # MyBB "search engine friendly" URL rewrites
            # - Note, for these to work with MyBB please make sure you have
            # the setting enabled in the Admin CP and you have this file
            # named .htaccess
            #
            <IfModule mod_rewrite.c>
            RewriteEngine on
            RewriteRule ^forum-([0-9]+).html forumdisplay.php?fid=$1 [L,QSA]
            RewriteRule ^forum-([0-9]+)-page-([0-9]+).html forumdisplay.php?fid=$1&page=$2 [L,QSA]

            RewriteRule ^thread-([0-9]+).html showthread.php?tid=$1 [L,QSA]
            RewriteRule ^thread-([0-9]+)-page-([0-9]+).html showthread.php?tid=$1&page=$2 [L,QSA]
            RewriteRule ^thread-([0-9]+)-lastpost.html showthread.php?tid=$1&action=lastpost [L,QSA]
            RewriteRule ^thread-([0-9]+)-nextnewest.html showthread.php?tid=$1&action=nextnewest [L,QSA]
            RewriteRule ^thread-([0-9]+)-nextoldest.html showthread.php?tid=$1&action=nextoldest [L,QSA]
            RewriteRule ^thread-([0-9]+)-newpost.html showthread.php?tid=$1&action=newpost [L,QSA]
            RewriteRule ^thread-([0-9]+)-post-([0-9]+).html showthread.php?tid=$1&pid=$2 [L,QSA]

            RewriteRule ^post-([0-9]+).html showthread.php?pid=$1 [L,QSA]

            RewriteRule ^announcement-([0-9]+).html announcements.php?aid=$1 [L,QSA]

            RewriteRule ^user-([0-9]+).html member.php?action=profile&uid=$1 [L,QSA]

            RewriteRule ^calendar-([0-9]+).html calendar.php?calendar=$1 [L,QSA]
            RewriteRule ^calendar-([0-9]+)-year-([0-9]+).html calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
            RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+).html calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
            RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+).html calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
            RewriteRule ^calendar-([0-9]+)-week-([0-9]+).html calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

            RewriteRule ^event-([0-9]+).html calendar.php?action=event&eid=$1 [L,QSA]

            <IfModule mod_env.c>
            SetEnv SEO_SUPPORT 1
            </IfModule>
            </IfModule>

            #
            # If Apache is compiled with built in mod_deflade/GZIP support
            # then GZIP Javascript, CSS, HTML and XML so they’re sent to
            # the client faster.
            #
            <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
            </IfModule>

            Any idea how to fix the issue? I noticed that if I changed the /forum/admin/index.php file to index2.php, and manually changed the URL, it worked as expected. Only does it when it’s index.php...

            I’m a total newb at .htaccess, so I’m basically lost at this point. >.>
              My Snippets
              -> PopUpChunk v1.0
              • 33372
              • 1,611 Posts
              What you probably need to do is to copy the .htaccess from your MODx Manager subdirectory (not the root one; the one that just turns off rewrites) to your MyBB admin subdirectory (so as to turn off rewriting in there also).
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 28033
                • 925 Posts
                Quote from: ZAP at Nov 10, 2008, 08:02 PM

                What you probably need to do is to copy the .htaccess from your MODx Manager subdirectory (not the root one; the one that just turns off rewrites) to your MyBB admin subdirectory (so as to turn off rewriting in there also).

                That doesn’t do anything. If that’s the case, doesn’t it *have* to be an issue on MyBB’s end, since turning it off should have fixed the problem?
                  My Snippets
                  -> PopUpChunk v1.0