The MU forums have moved to WordPress.org

htaccess conflicts with other scripts (6 posts)

  1. thelaw
    Member
    Posted 14 years ago #

    I'm using another script that I've put into the "classes" directory. It has its own htaccess instructions for inclusion, with virtually all of the rules as rewrites in the "classes" directory.

    Wordpress MU has the following htaccess requirements:

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    THIS IS THE OTHER SCRIPT

    RewriteRule ^classes/category/(.+)$ /classes/index.php?cat_name=$1 [NC,L]
    RewriteRule ^classes/class/(.+)$ /classes/index.php?post_permalink=1&post_id=$1 [NC,L]
    RewriteRule ^classes/profile/(.+)$ /classes/index.php?show_emp=$1 [NC,L]
    RewriteCond %{QUERY_STRING} .+
    RewriteRule ^classes/page([0-9]+) /classes/index.php?%{QUERY_STRING}&class_page_link=$1 [NC,L]
    RewriteRule ^classes/page([0-9]+) /classes/index.php?class_page_link=$1 [NC,L]
    </IfModule>
    -----------------------------------------------
    The LAST WP one, the . index.php [L} line is causing "file not found" errors in the classes directory script. If I remove that instruction, the other script works but the entire worldpress MU goes down. Any ideas on how to solve something like this? Probably happens often with other scripts?

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Put the classes rules about the WPMU rules in the htaccess.

  3. thelaw
    Member
    Posted 14 years ago #

    andrea -

    I'm confused but I did fix the problem. I just put the classes part above the wordpress rules to operate first and it works fine. I'm not sure why. Thank you kindly for your response.

  4. andrea_r
    Moderator
    Posted 14 years ago #

    That's just what I said. :)

  5. kgraeme
    Member
    Posted 14 years ago #

    thelaw, don't worry I was confused too. "About"/"above" same difference. ;-)

  6. andrea_r
    Moderator
    Posted 14 years ago #

    It's the Canadian accent eh.

About this Topic