Skip to:
Content
Pages
Categories
Search
Top
Bottom

Blog posts redirecting to Home Page when permalinks are set to custom

  • 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anyone with any constructive thoughts on my dilemma? I feel like I’ve tried everything and yet the problem must be staring me straight in the face.

    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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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. Since /blogs is a virtual directory created by wordpress multisite, this seems to be where the problem stems from (although the absence of an /images folder is also throwing up errors). Anyone experienced this problem before and would like to take a crack at a suggestion?


    @mercime
    Participant

    @mercime

    == 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. ==

    Go to wp_options table via phpMyAdmin. Copy what’s in your wp-options table and paste in text editor. There’s a pattern to the madness of the serialized data which is sometimes very messy to edit by hand. Some plugins which have been deactivated and deleted still leave some nastiness behind and you would have to delete the section. Sometime back, I found the virus of a hacked install listed in wp_options table as well.

    What’s good about doing it this way is that you can save what was originally in the wp_options table in a text file and keep in a safe place while you make changes via phpMyAdmin. When something goes wrong after making those revisions, you can always paste back the original content from the txt file you saved.

    For an overview of what serialized data to expect in your wp_options table which could also help you ID what’s going on, go to http://yoursite.com/wp-admin/options.php or localhost/wordpress/wp-admin/options.php


    stwc
    Participant

    @stwc

    I’m getting the redirects errors in my group forums lately as well. Utterly at a loss about how to start trying to track it down, though.

    `[Mon May 30 00:54:15 2011] [error] [client 203.82.92.21] 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: http://gamefilter.net/games/gfi-mefi-nomic/forum/`

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blog posts redirecting to Home Page when permalinks are set to custom’ is closed to new replies.
Skip to toolbar