Multisite permalinks for subfolder wordpress installation
-
I have WordPress installed in a subfolder of the main site: https://www.mysite.com/blog/
Now I need to add second blog on https://www.mysite.com/blog/second/
So 2 blogs should work on the following URLs:
https://www.mysite.com/blog/
https://www.mysite.com/blog/second/I configures WordPress and almost everything works fine, but I have a little issue with the main blog (https://www.mysite.com/blog/), the post URLs look like /blog/blog/hello-world/ rather than /blog/hello-world/.
Second blog URLs work properly.I tried to change permalink structure in site settings to /%postname%/, and all URLs look good after that, but all they cause 404 error.
How can I get rid of double /blog mention in this case? Thanks in advance!
wp-config settings:
/* Multisite */ define( 'WP_ALLOW_MULTISITE', true ); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'www.mysite.com'); define('PATH_CURRENT_SITE', '/blog/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
htaccess:
RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] # 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]
- The topic ‘Multisite permalinks for subfolder wordpress installation’ is closed to new replies.