Not bad, but return 404.
-
Return 404 from old url (with “category”). 404 is not bad for new sites, but for old it must be 301. Multisite.
May be need to do somthing like this:
$blog_id = get_current_blog_id();
if ( is_multisite() && $blog_id == 1 ) {
$sitename = '/blog/';
}
elseif ( is_multisite() && $blog_id !== 1 ) {
$sitename = get_blog_details( $blogId )->path;
}
else {
$sitename = '/';
}
return $sitename;
And then change “/” before “category” to “$sitename” in all urls.
- The topic ‘Not bad, but return 404.’ is closed to new replies.