Support » Networking WordPress » Sub Directory setup redirects to multisite root if not www

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    So this link

    http://templateexpress.com/demos/premier

    should go to this link instead

    http://www.templateexpress.com/demos/premier

    But instead goes to

    http://www.templateexpress.com/demos

    Which it should not do… try adding these lines to the top of your .htaccess file above the WordPress generated lines.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} templateexpress\.com [NC]
    RewriteCond %{REQUEST_URI} ^/demos/(.*)
    RewriteRule ^(.*)$ http://www.templateexpress.com/$0 [R=301,L]
    </IfModule>

    If that’s on top of your existing .htaccess lines then that will only match if you have templateexpress.com as requested host and /demos/ as part of the URI.

    I have just installed multisite on 2 different servers and I have the same issue with sub sites or even the login url redirecting to the root IF www is NOT included in the url. Was the above a correct solutions?

    What could I use for a site that is not ins sub folder?

    I tried using a default theme, no plugins, installed wordpress through cpanel. Never had this issue before, what could cause this? I have other on the save server that are fine?

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sub Directory setup redirects to multisite root if not www’ is closed to new replies.