<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>bbPress Support Forums &#187; Topic: bbPress + WordPress (mu or not) leads to 404 errors, but p</title>
		<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load</link>
		<description>bbPress Support Forums &#187; Topic: bbPress + WordPress (mu or not) leads to 404 errors, but p</description>
		<language>en-US</language>
		<pubDate>Fri, 25 May 2012 11:07:56 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://bbpress.org/forums/rss/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load" rel="self" type="application/rss+xml" />

		<item>
			<title>paamayim on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-62075</link>
			<pubDate>Tue, 22 Dec 2009 12:49:46 +0000</pubDate>
			<dc:creator>paamayim</dc:creator>
			<guid isPermaLink="false">62075@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Just an update, I read elsewhere that this is deprecated in latest WP versions:</p>
<p><code>require_once dirname(dirname(__FILE__)) . &#39;/wp-blog-header.php&#39;;</code></p>
<p>This should be used instead:</p>
<p><code>require_once dirname(dirname(__FILE__)) . &#39;/wp-load.php&#39;;</code>
</p>]]></description>
					</item>
		<item>
			<title>paamayim on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-62072</link>
			<pubDate>Tue, 22 Dec 2009 09:36:31 +0000</pubDate>
			<dc:creator>paamayim</dc:creator>
			<guid isPermaLink="false">62072@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>This is so annoying guys :(</p>
<p>What's the cleanest solution to this, for WP 2.8.6 installed in / and bbPress 1.0.2 installed in /forum/ ?</p>
<p>Thanks very much, indexing is vital to me.
</p>]]></description>
					</item>
		<item>
			<title>Bagi Zoltan on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-60234</link>
			<pubDate>Sun, 01 Nov 2009 09:13:34 +0000</pubDate>
			<dc:creator>Bagi Zoltan</dc:creator>
			<guid isPermaLink="false">60234@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>I faced with the very same problem with two bbpress installations along with a WP. I slightly modified the function is_404() in the /wp-includes/query.php so the function returns true when the requested uri belongs to the forums.</p>
<p><code>function is_404 () {<br />
	global $wp_query;<br />
	if (preg_match('/(firstbbpressfoldername&#124;secondbbpressfoldername)/i', $_SERVER['REQUEST_URI']))<br />
	{return true;}<br />
	else{<br />
	return $wp_query-&#62;is_404;}<br />
}<br />
</code><br />
After saving the irritating 404 issue has gone.<br />
Regards<br />
Zoli
</p>]]></description>
					</item>
		<item>
			<title>Achilleus on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-18076</link>
			<pubDate>Fri, 08 Aug 2008 21:27:48 +0000</pubDate>
			<dc:creator>Achilleus</dc:creator>
			<guid isPermaLink="false">18076@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Would I be able to use the pretty URLs with this somehow?  Or maybe exclude the entire directory of /bbpress/ from wordpress's URL thing?</p>
<p>Using WMPU btw
</p>]]></description>
					</item>
		<item>
			<title>Ryan on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-15393</link>
			<pubDate>Tue, 15 Apr 2008 10:44:14 +0000</pubDate>
			<dc:creator>Ryan</dc:creator>
			<guid isPermaLink="false">15393@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Works great, although I added a couple of rewrite rules. </p>
<p>/forum/profile to /forum/profile.php and /forum/tags to /forum/tags.php</p>
<p>The profile and tags pages were still returning 404 headers.
</p>]]></description>
					</item>
		<item>
			<title>chrishajer on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-14906</link>
			<pubDate>Wed, 02 Apr 2008 21:09:35 +0000</pubDate>
			<dc:creator>chrishajer</dc:creator>
			<guid isPermaLink="false">14906@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>No listing in the plugins tab means the plugin is malformed and is seen as just a file in that directory, not a plugin.  You are going to need a plugin header, something as simple as this:</p>
<pre><code>&#60;?php
/*
Plugin Name: No 404s
*/
?&#62;</code></pre>
<p><a href="http://codex.wordpress.org/Writing_a_Plugin" rel="nofollow">http://codex.wordpress.org/Writing_a_Plugin</a>
</p>]]></description>
					</item>
		<item>
			<title>icesar on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-14899</link>
			<pubDate>Wed, 02 Apr 2008 18:19:10 +0000</pubDate>
			<dc:creator>icesar</dc:creator>
			<guid isPermaLink="false">14899@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Thanks for the reply Chris.  Yes, I'm using 2.3.3 right now.  The content of the plugin code is exactly as above:</p>
<pre><code>function mbob_flush_rewrites() {
	global $wp_rewrite;
	$wp_rewrite-&#62;flush_rules();
}
add_action(&#39;init&#39;, &#39;mbob_flush_rewrites&#39;);

function mbob_add_rewrites($wp_rewrite) {
	add_rewrite_rule(&#39;forums/topic&#39;, &#39;forums/topic.php&#39;);
	add_rewrite_rule(&#39;forums/forum&#39;, &#39;forums/forum.php&#39;);
	add_rewrite_rule(&#39;forums&#39;, &#39;forums/index.php&#39;);
	$wp_rewrite-&#62;rules = array_merge($wp_rewrite-&#62;non_wp_rules, $wp_rewrite-&#62;rules);
}
add_action(&#39;generate_rewrite_rules&#39;, &#39;mbob_add_rewrites&#39;);</code></pre>
<p>And I'm not getting a specific error really.  Simply that when I upload no404s.php with this code to my wp-content/plugins directory, there is no listing in the Plugins tab to even activate it.
</p>]]></description>
					</item>
		<item>
			<title>chrishajer on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-14885</link>
			<pubDate>Tue, 01 Apr 2008 21:59:57 +0000</pubDate>
			<dc:creator>chrishajer</dc:creator>
			<guid isPermaLink="false">14885@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>What does the content of your plugin look like, and what is the error you are getting when you try to activate it (do you have access to error logs)?  Also, what version WordPress are  you using( 2.3.3?)
</p>]]></description>
					</item>
		<item>
			<title>icesar on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-14883</link>
			<pubDate>Tue, 01 Apr 2008 21:19:08 +0000</pubDate>
			<dc:creator>icesar</dc:creator>
			<guid isPermaLink="false">14883@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>So close!  I have this same issue with my regular installation of WP, and I only realized today (after 3 months) that this is the reason my forums - <a href="http://argentinastravel.com/forums/" rel="nofollow">http://argentinastravel.com/forums/</a> - are not getting indexed!</p>
<p>I tried creating a plugin from the code above, but I couldn't activate it.  Can someone please help me with a step by step fix for a regular WP install?   Gracias!
</p>]]></description>
					</item>
		<item>
			<title>Vili on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-14027</link>
			<pubDate>Sun, 24 Feb 2008 10:00:28 +0000</pubDate>
			<dc:creator>Vili</dc:creator>
			<guid isPermaLink="false">14027@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Brilliant, absolutely brilliant. I had already got to the stage of banging my head against the wall a few times because of this, but now it's finally sorted out and my forums don't throw up those nasty 404s when validating and being indexed by search engines.</p>
<p>Thanks, beaulebens!
</p>]]></description>
					</item>
		<item>
			<title>Beau Lebens on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-13360</link>
			<pubDate>Fri, 25 Jan 2008 05:53:37 +0000</pubDate>
			<dc:creator>Beau Lebens</dc:creator>
			<guid isPermaLink="false">13360@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>@starnet - The best way is to have it in an auto-load WPMU plugin, which means stick it in a file called "no-404s.php"  or something in wp-content/mu-plugins/.
</p>]]></description>
					</item>
		<item>
			<title>starnet on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-13184</link>
			<pubDate>Wed, 16 Jan 2008 18:32:03 +0000</pubDate>
			<dc:creator>starnet</dc:creator>
			<guid isPermaLink="false">13184@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Beau,</p>
<p>Which files should you put this code on?  I am also installing bbPress on a MU WordPress.  I get the same error.  I thought maybe it's because of WP/MU not compatible with bbPress.   I have the same install directories (WP/MU on root and bbPress on /forums/).  And I am getting the same 404 error on user profile and post. </p>
<p>Thanks in advance
</p>]]></description>
					</item>
		<item>
			<title>Beau Lebens on "bbPress + WordPress (mu or not) leads to 404 errors, but p"</title>
			<link>http://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load#post-13156</link>
			<pubDate>Mon, 14 Jan 2008 21:45:19 +0000</pubDate>
			<dc:creator>Beau Lebens</dc:creator>
			<guid isPermaLink="false">13156@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p><strong>Background:</strong> Installed WPMU (at "/") and bbPress (at "/forums/"), followed integration instructions (and tweaked to get it all working). I used my WP theme header.php and footer.php as the basis for a bbPress theme, and loaded the full WP engine into bbPress by putting this code in my config.php<br />
<pre><code>// Load WordPress so we can use the same templates.
define(&#39;WP_BB&#39;, &#39;true&#39;);
require_once dirname(dirname(__FILE__)) . &#39;/wp-blog-header.php&#39;;</code></pre>
<p><strong>Symptoms:</strong> Pages load just fine, and all appears successful, <em>but</em>, upon further inspection, all bbPress pages actually return a 404 error in the HTML headers (you can see this using FireBug, or using a HEAD command to the page). NOTE: This will also happen if you create custom pages (not WP "Pages") that load the WordPress engine - they load fine, but actually throw a 404).</p>
<p><strong>Explanation:</strong> What appears to be happening here, is that the page loads fine, because it is a real page. Internally however, WP doesn't know about this page (because it's a bbPress, or custom page), and so it assumes it's a request for a permalink that it can't resolve. Thus it throws a 404.</p>
<p>The internal rewrite system in WP allows you to add new rewrite rules, but appears to only like dealing with "internal" or WP-specific rules. If you add in what it refers to as "non_wp_rules", then it doesn't actually apply them (so it still throws a 404).</p>
<p><strong>The FIX!</strong> on the code that I'm running, I have put the following <strong>WordPress</strong> plugin in place to add rules appropriate for my bbPress installation:<br />
<pre><code>function mbob_flush_rewrites() {
	global $wp_rewrite;
	$wp_rewrite-&#62;flush_rules();
}
add_action(&#39;init&#39;, &#39;mbob_flush_rewrites&#39;);

function mbob_add_rewrites($wp_rewrite) {
	add_rewrite_rule(&#39;forums/topic&#39;, &#39;forums/topic.php&#39;);
	add_rewrite_rule(&#39;forums/forum&#39;, &#39;forums/forum.php&#39;);
	add_rewrite_rule(&#39;forums&#39;, &#39;forums/index.php&#39;);
	$wp_rewrite-&#62;rules = array_merge($wp_rewrite-&#62;non_wp_rules, $wp_rewrite-&#62;rules);
}
add_action(&#39;generate_rewrite_rules&#39;, &#39;mbob_add_rewrites&#39;);</code></pre>
<p>NOTE: I have removed a lot of my bbPress installation as part of my integration, so I didn't require any other rules to handle things like profile pages or tags - you probably will need to add them if you use those features.</p>
<p>Hopefully this will help someone else and prevent you from beating your head against a wall like I almost did :)</p>
<p>Thanks to sambauers for helping me out with this in #bbpress as well.</p>
<p>Beau
</p>]]></description>
					</item>

	</channel>
</rss>

