WordPress.org

Ready to get started?Download WordPress

Forums

.htaccss gone crazy (3 posts)

  1. mkbclr
    Member
    Posted 1 year ago #

    Here's the wordpress part of my htaccess
    It is a wordpress MU

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteRule ^index\.php$ - [L]
    RewriteRule ^old-subsite/(.*)$ /television/$1 [R=301,L]
    RewriteRule ^old-subsite-2/(.*)$ /radio/$1 [R=301,L]
    RewriteRule ^/(.*)$/print/ http://www.mydomain.com/$1/ [R=301,L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    # BEGIN WordPress
    RewriteEngine On

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

    So here's the thing -
    On every visit i see in the apache error log that there is an error, something like too many redirects, exceeded limit of 10

    if i change those two $2 to $1, the redirect errors stops, and the home page loads - but other things break, like the subsites' css and scripts won't load. i dodn't even explore farther to see what else might be messed up,

    is there something wrong with my htaccess?

    i don't have the main site in a sub-directory if that matters.

  2. mkbclr
    Member
    Posted 1 year ago #

    Just looking over that i should also mention that we changed the names of the subsites. one is now called television, one called radio. that's what's up with those 301s

  3. mkbclr
    Member
    Posted 1 year ago #

    at least could someone tell me what the $2 variable refer to?

    i have limited knowledge of htaccess - but i know that if i change those last two $2 to $1 - the site still loads, and the redirect errors stop, but my sub-sites cannot load any css or scripts

Topic Closed

This topic has been closed to new replies.

About this Topic