Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455801 - cannot get to single-post-entries for main blog
Summary: cannot get to single-post-entries for main blog
Alias: None
Product: Red Hat Collaboration Applications
Classification: Retired
Component: Wordpress
Version: Backlog
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Monty Hood
QA Contact: Sudhir Mallamprabhakara
: 457580 (view as bug list)
Depends On:
Blocks: BackLog
TreeView+ depends on / blocked
Reported: 2008-07-17 21:01 UTC by Bret McMillan
Modified: 2010-06-23 19:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-06-23 19:31:17 UTC

Attachments (Terms of Use)
proposed redirect config change (deleted)
2008-09-02 18:32 UTC, Bret McMillan
no flags Details | Diff

Description Bret McMillan 2008-07-17 21:01:22 UTC
Description of problem:

Going directly to a particular  blog entry for the main
blog (see $URL) causes a redirect to happen, which results in the user being
taken to the login page, or to the wp-admin/ area.

This shouldn't happen, the user should be taken to the specific post.

Steps to Reproduce:
1. Go to $URL
Actual results:
Login or admin page shown 

Expected results:
The specified post should be displayed

Additional info:
Most likely this is a missing rewrite rule.

Comment 1 Bret McMillan 2008-07-18 13:40:22 UTC
Ok, not a missing rewrite rule.  Looks more like a core wpmu flaw when

Comment 2 Bret McMillan 2008-07-18 14:01:53 UTC
Started a thread in the wpmu forums:

Comment 3 Bret McMillan 2008-07-21 18:17:09 UTC
Looks like the issue is with how the original everest datasource snapshot took
place.  there should be a "blog/" url prefix for the main blog when not using

Comment 4 Bret McMillan 2008-08-22 16:34:31 UTC
Upping severity and priority, likely a db-level issue as a result of the initial installation.

Comment 5 Bret McMillan 2008-09-02 16:29:34 UTC
*** Bug 457580 has been marked as a duplicate of this bug. ***

Comment 6 Bret McMillan 2008-09-02 18:31:16 UTC
Ok, so this does appear to be an issue w/ the original config of the system. 
Need to run a sql update of the system to fix the issue, and implement a
redirect ...

SQL change:
UPDATE wp_blogs SET path = '/internalblogs/' WHERE blog_id = 1;


commit 7fc3e9d850d87e6aaa40ea8bfdc21138bedcfc3a
Author: Bret McMillan <>
Date:   Tue Sep 2 14:30:11 2008 -0400

    bz 455801:  main blog needs to be on same level as other blogs

diff --git a/templates/wordpress-mu-proxy.conf.erb
index 016f3fa..1714e9e 100644
--- a/templates/wordpress-mu-proxy.conf.erb
+++ b/templates/wordpress-mu-proxy.conf.erb
@@ -60,6 +60,8 @@ NameVirtualHost <%= ipaddress %>:443
   ServerName <%= wpmu_visible_hostname %>
   DocumentRoot /usr/share/wordpress-mu

+  RewriteRule ^/$ https://<%= wpmu_visible_hostname %>/internalblogs/
   # security; force https on certain urls
   RewriteRule ^/(.*?)wp-(admin/|login|register)(.*) https://<%=
wpmu_visible_hostname %>/$1wp-$2$3 [L]
@@ -68,6 +70,8 @@ NameVirtualHost <%= ipaddress %>:443
 <VirtualHost <%= wpmu_visible_hostname %>:443>
   RewriteEngine on

+  RewriteRule ^/$ https://<%= wpmu_visible_hostname %>/internalblogs/
   SSLEngine on
   DocumentRoot /usr/share/wordpress-mu

Comment 7 Bret McMillan 2008-09-02 18:32:31 UTC
Created attachment 315576 [details]
proposed redirect config change

Attaching the patch since git diff's don't appear well as a comment...

Comment 8 David Lawrence 2008-10-06 16:35:08 UTC
Moving to product "Red Hat Collaboration Applications".

Comment 9 Anne Cressman 2008-11-18 17:08:27 UTC
See User Story #50326.

Comment 10 Bret McMillan 2009-04-06 15:28:09 UTC
Looks like this was the wrong fix; instead of moving the blog down to be a peer, should have probably fixed its permalink structure.  See:

Anyway, here's what needs to be applied to the db to revert the /internalblogs/ change:

UPDATE wp_blogs SET path = '/' WHERE blog_id = 1;

UPDATE wp_1_options SET option_value = '' WHERE option_name in ('siteurl', 'home') and option_value like '%blogs.collab.webdev%';

update wp_1_options set option_value = '/blog/%year%/%monthnum%/%day%/%postname%/' where option_name = 'permalink_structure';

Then need to alter the RedirectMatch to point /internalblogs/ stuff back to the root.  Silly me :(

Comment 12 Bret McMillan 2010-06-23 19:31:17 UTC
Closing legacy junk.

Note You need to log in before you can comment on or make changes to this bug.