The MU forums have moved to

need mod_rewrite solution... (4 posts)

  1. lucid1
    Posted 17 years ago #

    ok long story short, I have a bundle of directorys that need to be accessed from the domain that I am installing wpmu on.

    .htaccess sends me all over the place... but never to these directories.
    is there a simple rewrite rule I can use to forward say,
    ^(.*)/(.*)$         /$1/$2
    if it isnt already being forwarded from above?

  2. lucid1
    Posted 17 years ago #

    ok got it, here is the solution I found, incase anyone needs it or wants to tell me that it is dangerous... I really dont know better....

    I put this after the main blog rules, and before the other blog rules...

    # catch retro directories
    RewriteRule ^(.+)/(.*)$     $1/$2 [L]
    RewriteRule ^(.+)$     $1 [L]

  3. lucid1
    Posted 17 years ago #

    well I thought it was fixed but now my slugs dont work.... can I make them work on all subdomains but not on the main domain?

  4. lucid1
    Posted 17 years ago #

    ok I got it now.... I had to setup specific slugs on the main blog, but the rest work as they are made....

    RewriteRule ^about/$     /wp-inst/index.php?pagename=about [L]
    RewriteRule ^contact/$     /wp-inst/index.php?pagename=contact [L]
    RewriteRule ^links/$     /wp-inst/index.php?pagename=links [L]
    RewriteRule ^archives/$     /wp-inst/index.php?pagename=archives [L]

    RewriteCond %{HTTP_HOST} !^([_0-9a-zA-Z-]+)\.anyonesblog\.com$
    RewriteRule ^(.+)/(.*)$    $1/$2 [L]

    RewriteCond %{HTTP_HOST} !^([_0-9a-zA-Z-]+)\.anyonesblog\.com$
    RewriteRule ^(.+)$    $1 [L]

    this might of been much easier for someone that knows how....

About this Topic