301 redirect for the extra "blog" entry (7 posts)

  1. popokolok
    Posted 5 years ago #

    Hello, I have installed the multisite wordpress, and I have a question regarding the extra entry in the permalinks - "/blog/", even though the links on my blog have indeed changed to include the extra entry, I still can access the same pages with the old links without the extra entry - my question is: can I redirect the old links to the new ones with .htaccess - what code do I need? Thanks!!

  2. huh.

    no idea why you can access the old permalinks - you shouldn't be able to at all.


  3. popokolok
    Posted 5 years ago #

    Hi, here's an example:




    Here's my .htaccess WP section:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    Am I missing something?


  4. Just go to Super Admin -> Sites and click edit on the main site (hover over the name). then scroll down and remove the /blog/ from the permalink settings and everywhere else you can find.

  5. popokolok
    Posted 5 years ago #

    Yeah, wanted to do that but isn't /blog/ necessary, according to wordpress codex? Thanks!

  6. It's added, but you can remove it - like I stated. I'm not sure what else is going on with your site with the other permalinks still being there, but that's what I would do.

    the /blog/ in the main site's permalinks is to prevent URL collisions between page names on the main site and blog names. If it's just you running the network, you should be okay and remember. ;)

  7. The htaccess you listed is for subdomains, so you should be fine from conflicts with sub sites.

    If you're using subdomains, you should grab the htaccess for that - http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite

Topic Closed

This topic has been closed to new replies.

About this Topic