Blog posts redirecting to Home Page
-
A really frustrating problem arose this afternoon that I guess must have arisen when I was disabling a plugin. Basically if I click on a blog post (or even just enter its URL in the browser window) it redirects to the home page. The same thing happens whether the home page is a blog listing or activity listing.
My config is pretty standard WP3.12 BP 1.28, all the usual plugins. I’m an experienced WP developer so I know the score. I disabled all plugins, then reverted the site back to TwentyTen to then start adding the various bespoke elements back again. The permalinks are fine with TwentyTen, but as soon as I reinstall the BP default theme (which is a parent of my custom theme) the problem resurfaces. When I change permalink settings in admin back to the default (i.e. ugly) format, then the problem is resolved and clicking on an index blog entry takes me through to the single.php page.
For clarification I am only running a single .htaccess file which is in the root of my site, WP is installed in the root also and there are no other applications on this domain. I can’t give you a link to the site, because the domain is hidden behind a redirect (which goes back to our main site), as we get ready to make this new site live.
I have reloaded a fresh install of Buddypress, with a fresh BP default, but the problem persists, which means it must be an error in the database. I’ve also played around with my .htaccess file, removing and then restarting with a fresh copy, and this is the same .htaccess file that I’m using on 5 other WP sites that I run.
Looking into the DB I can see that the redirects column in wp-options is pretty large and I would imagine this is where the problem stems from, but I’m not comfortable manually editing this table.
Any thoughts, experiences or suggestions? My next step is to reinstall on a fresh DB, then try and recover the tables containing posts and other non-config data, which will obviously be a PITA.
The last 12 hours history in my error log looks like this:
[Thu May 05 22:53:01 2011] [alert] [client 184.106.221.215] /home/public_html/site.com/public/htdocs/.htaccess: RewriteRule: bad argument line '^([_0-9a-zA-Z-]+/)?files/(.+)' [Thu May 05 22:54:01 2011] [alert] [client 184.106.221.215] /home/public_html/site.com/public/htdocs/.htaccess: RewriteRule: bad argument line '^([_0-9a-zA-Z-]+/)?files/(.+)' [Fri May 06 09:01:04 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/wp-content/themes/images, referer: https://site.com/wp-content/themes/themename/style.css [Fri May 06 09:01:09 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/blog, referer: https://site.com/ [Fri May 06 09:01:57 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/wp-content/themes/images, referer: https://site.com/wp-content/themes/themename/style.css [Fri May 06 09:02:03 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/blog, referer: https://site.com/ [Fri May 06 10:15:05 2011] [error] [client 86.137.115.250] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: https://site.com/wp-content/themes/themename/style.css [Fri May 06 10:15:10 2011] [error] [client 86.137.115.250] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: https://site.com/ [Fri May 06 10:16:05 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/wp-content/themes/images, referer: https://site.com/wp-content/themes/themename/style.css [Fri May 06 10:16:13 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/wp-admin/network/images, referer: https://site.com/wp-admin/network/ [Fri May 06 10:17:03 2011] [error] [client 86.137.115.250] File does not exist: /home/public_html/site.com/public/htdocs/blog, referer: https://site.com/
So basically what seems to be happening is the server looks for /public/htdocs/blog, doesn’t find it and then redirects to the home page by default.
The REALLY frustrating thing is that it worked fine up until yesterday, we were just about to make the site live when this bug appeared.
Note: my httpd.conf for this domain is set up to allow mod rewrites, my .htaccess file in the root directory is as per any other WP multisite installation (with subdirectory format).
It must be something REALLY simple, but I’m too close and cannot see it.
- The topic ‘Blog posts redirecting to Home Page’ is closed to new replies.