• Hi, I am trying to figure out how to perfrom an .htaccess 301 redirect on an installation of a multi wordpress site.

    I would like to have:
    blog.domain.com/ redirect to: blog.domain.com/site1

    Anytime I try putting a redirect in the .htaccess file, I get all sorts of server errors, and loops. Anyone have any suggestions? I can’t be the only person seeking to do such.

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /blog.domain.com/
    RewriteRule ^index\.php$ - [L]
    
    Redirect 301 /index.php /mysite
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    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
Viewing 1 replies (of 1 total)
  • Thread Starter elanio

    (@elanio)

    I have also tried this:

    RewriteCond %{HTTP_HOST} ^(blog.)?domain.com$
    RewriteRule ^(/)?$ mysite [L]

    no luck.

    **Note** I am doing this locally using MAMP, I have also verified that .htaccess and rewrites are working.

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite root 301 redirect to subdirectory’ is closed to new replies.