<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1-alpha" -->
<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: nicer slug url rewrite plugin (done!)</title>
		<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done</link>
		<description><![CDATA[bbPress Support Forums &raquo; Topic: nicer slug url rewrite plugin (done!)]]></description>
		<language>en-US</language>
		<pubDate>Sun, 21 Mar 2010 06:26:57 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1-alpha</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://bbpress.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://bbpress.org/forums/rss/topic/nicer-slug-url-rewrite-plugin-done" rel="self" type="application/rss+xml" />

		<item>
			<title>Dailytalker on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-60629</link>
			<pubDate>Sat, 14 Nov 2009 11:35:42 +0000</pubDate>
			<dc:creator>Dailytalker</dc:creator>
			<guid isPermaLink="false">60629@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Hi, I’ve just followed your instructions and was also able to remove “forum” and “topic” from the urls.&#60;/p&#62;
&#60;p&#62;But something is wrong because the pages cannot be found.  This is my rewrite code (it is a bit different from your code because I am using the newest version of bbpress):&#60;/p&#62;
&#60;p&#62;# BEGIN bbPress&#60;/p&#62;
&#60;p&#62;Options -MultiViews&#60;/p&#62;
&#60;p&#62;&#38;lt;IfModule mod_rewrite.c&#38;gt;&#60;br /&#62;
RewriteEngine On&#60;br /&#62;
RewriteBase /forum/&#60;/p&#62;
&#60;p&#62;    Options +FollowSymlinks&#60;/p&#62;
&#60;p&#62;RewriteRule ^page/([0-9]+)/?$ /index.php?page=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ forum.php?id=$1&#38;amp;page=$2 [L,QSA]&#60;br /&#62;
RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^forum/?$ [R=302,L,QSA]&#60;/p&#62;
&#60;p&#62;RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&#38;amp;page=$2 [L,QSA]&#60;br /&#62;
RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^topic/?$ /forum/ [R=302,L,QSA]&#60;/p&#62;
&#60;p&#62;RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ tags.php?tag=$1&#38;amp;page=$2 [L,QSA]&#60;br /&#62;
RewriteRule ^tags/([^/]+)/?$ tags.php?tag=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^tags/?$ tags.php [L,QSA]&#60;/p&#62;
&#60;p&#62;RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&#38;amp;page=$2 [L,QSA]&#60;br /&#62;
RewriteRule ^profile/([^/]+)/([^/]+)/?$ profile.php?id=$1&#38;amp;tab=$2 [L,QSA]&#60;br /&#62;
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&#38;amp;tab=$2&#38;amp;page=$3 [L,QSA]&#60;br /&#62;
RewriteRule ^profile/([^/]+)/?$ profile.php?id=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^profile/?$ profile.php [L,QSA]&#60;/p&#62;
&#60;p&#62;RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ view.php?view=$1&#38;amp;page=$2 [L,QSA]&#60;br /&#62;
RewriteRule ^view/([^/]+)/?$ view.php?view=$1 [L,QSA]&#60;/p&#62;
&#60;p&#62;RewriteRule ^rss/?$ rss.php [L,QSA]&#60;br /&#62;
RewriteRule ^rss/topics/?$ rss.php?topics=1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/forum/([^/]+)/?$ rss.php?forum=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/forum/([^/]+)/topics/?$ rss.php?forum=$1&#38;amp;topics=1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/topic/([^/]+)/?$ rss.php?topic=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/tags/([^/]+)/?$ rss.php?tag=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/tags/([^/]+)/topics/?$ /forum/rss.php?tag=$1&#38;amp;topics=1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/profile/([^/]+)/?$ rss.php?profile=$1 [L,QSA]&#60;br /&#62;
RewriteRule ^rss/view/([^/]+)/?$ /forum/rss.php?view=$1 [L,QSA]&#60;/p&#62;
&#60;p&#62;RewriteCond %{REQUEST_FILENAME} !-f&#60;br /&#62;
RewriteCond %{REQUEST_FILENAME} !-d&#60;br /&#62;
RewriteRule ^.*$ /forum/index.php [L]&#60;br /&#62;
&#38;lt;/IfModule&#38;gt;&#60;/p&#62;
&#60;p&#62;# END bbPress&#60;/p&#62;
&#60;p&#62;Probably I made something wrong with point four where you say that the lines 46 and 48 have to be switched. What do I actually have do do there?&#60;/p&#62;
&#60;p&#62;Quote: &#34;4. Open up bb-post.php at the root of your bbPress install and simply switch lines number 46 and 48&#34;&#60;/p&#62;
&#60;p&#62;Is it this code?&#60;br /&#62;
$link = get_post_link($post_id);&#60;/p&#62;
&#60;p&#62;$topic = get_topic( $topic_id, false );
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alekseo on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-59769</link>
			<pubDate>Tue, 20 Oct 2009 13:51:35 +0000</pubDate>
			<dc:creator>Alekseo</dc:creator>
			<guid isPermaLink="false">59769@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Anyone got this working atm? And im also wondering if this is the way to remove the topic/ from individual posts and then insert the /forums/FORUMNAME/postname instead?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>AphelionZ on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-58308</link>
			<pubDate>Sun, 20 Sep 2009 08:56:57 +0000</pubDate>
			<dc:creator>AphelionZ</dc:creator>
			<guid isPermaLink="false">58308@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Whoops! Sorry. Fixed.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kirpi.it on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-58304</link>
			<pubDate>Sun, 20 Sep 2009 06:12:24 +0000</pubDate>
			<dc:creator>kirpi.it</dc:creator>
			<guid isPermaLink="false">58304@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Point 4 in your linked page does not read in full, AphelionZ: it is cut...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>AphelionZ on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-58280</link>
			<pubDate>Sat, 19 Sep 2009 19:15:54 +0000</pubDate>
			<dc:creator>AphelionZ</dc:creator>
			<guid isPermaLink="false">58280@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;I updated this plugin with some fixes - new posts, and paging. Also, I used a better way of removing the forum/ and topic/ from the urls that doesn't involve str_replace.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://blog.markroberthenderson.com/getting-rid-of-forums-and-topic-from-bbpress-permalinks-updated-plugin/&#34; rel=&#34;nofollow&#34;&#62;http://blog.markroberthenderson.com/getting-rid-of-forums-and-topic-from-bbpress-permalinks-updated-plugin/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tommiehansen on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-41386</link>
			<pubDate>Tue, 21 Jul 2009 07:16:31 +0000</pubDate>
			<dc:creator>tommiehansen</dc:creator>
			<guid isPermaLink="false">41386@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Hm, this doesn't seem to work that well with bbPress 1.01 unfortunately. Posting new posts seem to go to hell and it just redirects one to FORUM-URL/&#60;/p&#62;
&#60;p&#62;Any updates?&#60;/p&#62;
&#60;p&#62;Forum:&#60;br /&#62;
&#60;a href=&#34;http://www.callofduty.se/forum/&#34; rel=&#34;nofollow&#34;&#62;http://www.callofduty.se/forum/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>anandsrinivasan on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-24607</link>
			<pubDate>Mon, 09 Mar 2009 14:42:46 +0000</pubDate>
			<dc:creator>anandsrinivasan</dc:creator>
			<guid isPermaLink="false">24607@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Is there a 'for dummies' version of the same. I am programming-handicapped and can understand nothing of what is been discussed here, though I too want to achieve the same thing :O&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kilbot on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-22988</link>
			<pubDate>Tue, 13 Jan 2009 03:53:59 +0000</pubDate>
			<dc:creator>kilbot</dc:creator>
			<guid isPermaLink="false">22988@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Has anyone got search results to work ok with this plugin?&#60;br /&#62;
The post_link() on my search results are missing the base directory and forum slug (ie: they look like &#60;a href=&#34;http://domain.tld//topic-slug#id)&#34; rel=&#34;nofollow&#34;&#62;http://domain.tld//topic-slug#id)&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Also, the &#60;a href=&#34;http://bbpress.org/plugins/topic/67&#34;&#62;My Views&#60;/a&#62; plugins don't seem to work properly, has anyone else noticed this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Pertinax786 on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-21212</link>
			<pubDate>Tue, 02 Dec 2008 19:25:57 +0000</pubDate>
			<dc:creator>Pertinax786</dc:creator>
			<guid isPermaLink="false">21212@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;I have it working ok with the plugin, but testing reveals it fails to work with multipage threads, eg:&#60;br /&#62;
&#60;a href=&#34;http://domain.com/forums/test/your-first-topic/page/2&#34; rel=&#34;nofollow&#34;&#62;http://domain.com/forums/test/your-first-topic/page/2&#60;/a&#62;&#60;br /&#62;
breaks and redirects to //&#60;/p&#62;
&#60;p&#62;I had a look at the rewrites and similar but it seems ok (though I am not an expert), so I am at a loss. Is anyone else having this problem? Any ideas on a fix?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>flywitness on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-18221</link>
			<pubDate>Tue, 12 Aug 2008 22:26:29 +0000</pubDate>
			<dc:creator>flywitness</dc:creator>
			<guid isPermaLink="false">18221@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;got it working by doing this&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://bbpress.org/forums/topic/admin-link-not-working-solution&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/forums/topic/admin-link-not-working-solution&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>flywitness on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-18142</link>
			<pubDate>Mon, 11 Aug 2008 13:09:26 +0000</pubDate>
			<dc:creator>flywitness</dc:creator>
			<guid isPermaLink="false">18142@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;actually, the admin link only works if you login on the bbpress page.&#60;/p&#62;
&#60;p&#62;bummer
&#60;/p&#62;</description>
		</item>
		<item>
			<title>flywitness on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-18139</link>
			<pubDate>Mon, 11 Aug 2008 11:19:48 +0000</pubDate>
			<dc:creator>flywitness</dc:creator>
			<guid isPermaLink="false">18139@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;the admin link can be brought to life by adding this:&#60;/p&#62;
&#60;p&#62;RewriteRule ^bb-admin/$ - [L]&#60;/p&#62;
&#60;p&#62;before this line:&#60;/p&#62;
&#60;p&#62;RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$  topic.php?id=$2&#38;#38;page=$3 [L,QSA]&#60;/p&#62;
&#60;p&#62;and to resurrect login, remove or comment out the line:&#60;/p&#62;
&#60;p&#62;RewriteRule ^bb-login.php$ index.php&#60;/p&#62;
&#60;p&#62;i don't know why its there. perhaps its for something important that i don't get.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoratio on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-16164</link>
			<pubDate>Mon, 12 May 2008 18:01:29 +0000</pubDate>
			<dc:creator>mrhoratio</dc:creator>
			<guid isPermaLink="false">16164@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Nevermind my last post. You can just swap the positions of line 43 and 45, in bb-post.php, and it works. Not sure why, but it does.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoratio on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-16145</link>
			<pubDate>Mon, 12 May 2008 05:27:24 +0000</pubDate>
			<dc:creator>mrhoratio</dc:creator>
			<guid isPermaLink="false">16145@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;I discovered another issue with this hack. If you write a new post in a new topic, after the submitting the form, you are redirected back to the forum's front page, instead of the forum you were on. I spent some time digging around the get_post_link() related functions, and couldn't figure out exactly what was going on. However, I was able to make this modification to the bb-post.php file to get it to redirect properly.&#60;/p&#62;
&#60;p&#62;Paste this after line 43, in bb-post.php of bbPress 0.9.0.2&#60;br /&#62;
&#60;code&#62;$link = str_replace(&#38;#39;forums/&#38;#39;, &#38;quot;forums/&#38;quot;. $forum-&#38;gt;$topic_slug, $link);&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoratio on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-16042</link>
			<pubDate>Wed, 07 May 2008 21:31:39 +0000</pubDate>
			<dc:creator>mrhoratio</dc:creator>
			<guid isPermaLink="false">16042@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;I just found a blog post about this, where the author has made the code into a plugin. It's available for download here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.technospot.net/blogs/how-to-remove-forum-and-topic-keyword-from-bbpress-url/&#34; rel=&#34;nofollow&#34;&#62;http://www.technospot.net/blogs/how-to-remove-forum-and-topic-keyword-from-bbpress-url/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The author lists two minor issues here, which hopefully someone here can suggest a fix for:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
• The Link to BBpress admin board link does not work from main site. It redirects to home page. You will need to manually type the link to go inside.&#60;/p&#62;
&#60;p&#62;• In case you type something which does not exists as &#60;a href=&#34;http://sitename.com/&#38;#038;lt;bbpress-directory&#38;#038;gt;/sdaksda&#34; rel=&#34;nofollow&#34;&#62;http://sitename.com/&#38;#038;lt;bbpress-directory&#38;#038;gt;/sdaksda&#60;/a&#62; it returns &#60;a href=&#34;http://sitename.com/&#38;#038;lt;bbpress-directory&#38;#038;gt://&#34; rel=&#34;nofollow&#34;&#62;http://sitename.com/&#38;#038;lt;bbpress-directory&#38;#038;gt://&#60;/a&#62; . An extra slash.&#60;/p&#62;
&#60;/blockquote&#62;</description>
		</item>
		<item>
			<title>_ck_ on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14701</link>
			<pubDate>Wed, 26 Mar 2008 18:33:47 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">14701@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;If this is known working, it's useful as a few people have requested the ability to remove /forum/ and /topic/&#60;/p&#62;
&#60;p&#62;The author should be encouraged to add this to the plugin browser:&#60;br /&#62;
&#60;a href=&#34;http://bbpress.org/plugins/requests/&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/plugins/requests/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>aiitee on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14697</link>
			<pubDate>Wed, 26 Mar 2008 15:00:34 +0000</pubDate>
			<dc:creator>aiitee</dc:creator>
			<guid isPermaLink="false">14697@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;should i add the first code before the ?&#38;gt; right? because that didnt worked out for me... and the mod rewrite rules i added to the .htacess file, i have some coding there:&#60;/p&#62;
&#60;p&#62;Options +FollowSymLinks +ExecCGI&#60;/p&#62;
&#60;p&#62;&#38;lt;IfModule mod_rewrite.c&#38;gt;&#60;br /&#62;
  RewriteEngine On&#60;br /&#62;
  RewriteBase /&#60;/p&#62;
&#60;p&#62;  RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^tags/([^/]+)/?$ /tags.php?tag=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^tags/?$ /tags.php [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/([^/]+)/?$ /profile.php?id=$1&#38;#38;tab=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&#38;#38;tab=$2&#38;#38;page=$3 [L,QSA]&#60;br /&#62;
  RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&#38;#38;page=$2 [L,QSA]&#60;br /&#62;
  RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/?$ /rss.php [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]&#60;br /&#62;
  RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]&#60;br /&#62;
&#38;lt;/IfModule&#38;gt;&#60;/p&#62;
&#60;p&#62;should i delete this and copy the one you gave me?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>steward on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14442</link>
			<pubDate>Thu, 13 Mar 2008 06:31:37 +0000</pubDate>
			<dc:creator>steward</dc:creator>
			<guid isPermaLink="false">14442@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Yesssss I did it!!!&#60;br /&#62;
Instructions for Apache users:&#60;br /&#62;
1. Append to &#38;lt;bbpress-root&#38;gt;/bb-includes/template-functions.php before &#34;?&#38;gt;&#34; code from first message in this topic.&#60;br /&#62;
2. Create or edit .htaccess file in &#38;lt;bbpress-root&#38;gt; directory and put into then next code&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Options +FollowSymlinks

RewriteEngine On

RewriteBase /!!!!!! your bbpress root dir!!!!!!!/ #edit this!!!!

RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ 		tags.php?tag=&#38;#38;page= [L,QSA]
RewriteRule ^tags/([^/]+)/?$ 				tags.php?tag= [L,QSA]
RewriteRule ^tags/?$ 					tags.php [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ 		profile.php?id=&#38;#38;page= [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ 		profile.php?id=&#38;#38;tab= [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ 	profile.php?id=&#38;#38;tab=&#38;#38;page= [L,QSA]
RewriteRule ^profile/([^/]+)/?$ 			profile.php?id= [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ 		view.php?view=&#38;#38;page= [L,QSA]
RewriteRule ^view/([^/]+)/?$ 				view.php?view= [L,QSA]
RewriteRule ^rss/?$ 					rss.php [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ 			rss.php?forum= [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ 			rss.php?topic= [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ 			rss.php?tag= [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ 			rss.php?profile= [L,QSA]

RewriteRule ^bb-login.php$ index.php

RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$ 		topic.php?id=&#38;#38;page= [L,QSA]
RewriteRule ^([^/.]+)/([^.]+)/?$ 			topic.php?id= [L,QSA]

RewriteRule ^([^/.]+)/page/([0-9]+)/?$ 			forum.php?id=&#38;#38;page= [L,QSA]
RewriteRule ^([^/.]+)/?$ 				forum.php?id= [L,QSA]&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>steward on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-14399</link>
			<pubDate>Tue, 11 Mar 2008 12:26:47 +0000</pubDate>
			<dc:creator>steward</dc:creator>
			<guid isPermaLink="false">14399@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Help... I don't understand anything :(.&#60;br /&#62;
I read step by step your instruction and do all what do you wrote.&#60;br /&#62;
But at the and I got: &#34;The requested URL /&#38;lt;forum-home-dir&#38;gt;/&#38;lt;forum-slug&#38;gt; was not found on this server.&#34;&#60;/p&#62;
&#60;p&#62;What I do wrong?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gusext on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-13090</link>
			<pubDate>Thu, 10 Jan 2008 16:06:55 +0000</pubDate>
			<dc:creator>gusext</dc:creator>
			<guid isPermaLink="false">13090@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;it is currently active on tour2000.it/forum (it's a BIG forum with multiple domains names (~20)  and forum names).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kaolin on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-12905</link>
			<pubDate>Thu, 27 Dec 2007 09:14:10 +0000</pubDate>
			<dc:creator>kaolin</dc:creator>
			<guid isPermaLink="false">12905@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;haven't, but it looks reasonable.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mvh on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-12843</link>
			<pubDate>Sat, 22 Dec 2007 10:06:59 +0000</pubDate>
			<dc:creator>mvh</dc:creator>
			<guid isPermaLink="false">12843@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Has anyone tried this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gusext on "nicer slug url rewrite plugin (done!)"</title>
			<link>http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done#post-10610</link>
			<pubDate>Thu, 30 Aug 2007 15:54:43 +0000</pubDate>
			<dc:creator>gusext</dc:creator>
			<guid isPermaLink="false">10610@http://bbpress.org/forums/</guid>
			<description>&#60;p&#62;Hi all. &#60;/p&#62;
&#60;p&#62;(Sorry for my bad english. I tried to be verbose in order to avoid my bad english affect your understanding)&#60;/p&#62;
&#60;p&#62;I wrote a plug-in, in order to have the best rewrite rules (in my opinion :p ) in the world.&#60;/p&#62;
&#60;p&#62;this plugin achieves two things:&#60;/p&#62;
&#60;p&#62;One: I need to show, in the URL, the logical parent-to-child relation between forums and topics, so&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/topic/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/topic/my-sweet-dog&#60;/a&#62;&#60;br /&#62;
URL has to show the forum that contains the topic, and become&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;when performing the rewrite, the rules totally ignore the forum part, so it's only a visual thing.&#60;/p&#62;
&#60;p&#62;and, more difficult, &#60;/p&#62;
&#60;p&#62;Two: I need to shorten the URL and have fewer subdirectories, so&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog&#60;/a&#62;&#60;br /&#62;
has to lose the useless &#34;/forum/&#34; and the useless &#34;/topic/&#34; parts, and become&#60;br /&#62;
&#60;a href=&#34;http://www.example.com/bbpress/pets-discussions/my-sweet-dog&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/bbpress/pets-discussions/my-sweet-dog&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;ATTENTION: you cannot do the second thing without the first thing. you must be able, in rewrite rules, to discriminate between a topic and a forum. you then will have that forums have one string (the forum slugged name), while topics have two strings (the forum slugged name and the topic slugged name), so you can do that, and /pets-discussion/my-sweet-dog will belong to &#34;My Sweet Dog&#34; topic in &#34;Pets Discussions&#34; forum&#60;/p&#62;
&#60;p&#62;In order to do so, I need to&#60;br /&#62;
- modify forum link creation&#60;br /&#62;
- modify topic link creation&#60;br /&#62;
- modify rewrite rules&#60;br /&#62;
- avoid a forum to have a reserved name, as using bbpressfolder/forumname to reach a forum is risky! I have to prevent a forum from having a slugged name like &#34;bb-admin&#34;!!!	here's a list of reserved words:&#60;br /&#62;
- all words with a dot. those are files, like style.css and so on. the slugged names never have a dot. I have only to avoid rewrite of dotted words.&#60;br /&#62;
	- all bbpress subfolders and special folders. these are all that start with&#60;br /&#62;
		bb-* , 	my-*&#60;br /&#62;
	- every other reserved word already used by rewrite engine:&#60;br /&#62;
		tag, profiles, view, rss&#60;/p&#62;
&#60;p&#62;All this is achieved adding a &#34;r-&#34; string in front of the slugged string. so a forum named &#34;My Forum!&#34; will have &#34;r-my-forum&#34; as slugged name. Unfortunately, this filter operates also for topic names and maybe other things. this mean that a topic named &#34;rss&#34; will have &#34;r-rss&#34; as slugged name. Not so bad, in facts.&#60;/p&#62;
&#60;p&#62;So these are the operations:&#60;br /&#62;
- add a filter to get_forum_link (delete the &#34;/forum&#34; part)&#60;br /&#62;
- add a filter to get_topic_link (add the &#34;forum/slug-forum-name&#34; in the link, and eliminate the &#34;/forum&#34; and &#34;/topic&#34; parts)&#60;br /&#62;
- modify the rewrite rules (I used IIS isapirewrite, but apache is pretty the same)&#60;br /&#62;
- add a filter to bb_slug_sanitize (avoid a forum to have a reserved word as slugged-name, like &#34;rss&#34;, &#34;profiles&#34;, &#34;my-plugins&#34;, etc&#60;/p&#62;
&#60;p&#62;And there is the code for these operations:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_get_forum_link_filter( $link , $forum_id = 0 ) {
	//retrieve the forum object
    $forum = get_forum( get_forum_id( $forum_id ));

    //check for rewrite
	$rewrite = bb_get_option( &#38;#39;mod_rewrite&#38;#39; );
	if ( $rewrite ) {
		//what kind of rewrite there is? slug use &#38;quot;forum_slug&#38;quot; column, else the column is &#38;quot;forum_id&#38;quot;
		$column = ($rewrite === &#38;#39;slugs&#38;#39;)?(&#38;#39;forum_slug&#38;#39;):(&#38;#39;forum_id&#38;#39;);

		//	change /forum/pets-discussions in /pets-discussions
		//		this work only if the rewrite module is modded!
		//		and this work only if the slugged name will NEVER
		//		be a reserved word like &#38;quot;rss&#38;quot; or &#38;quot;bb-images&#38;quot;
		//		and this is achieved by a filter on bb_slug_sanitize
		$link = str_replace(&#38;#39;forum/&#38;#39; . $forum-&#38;gt;$column , $forum-&#38;gt;$column, $link);
	}
    return $link; // Very important line!
}

add_filter( &#38;#39;get_forum_link&#38;#39;, &#38;#39;my_get_forum_link_filter&#38;#39; );

function my_get_topic_link_filter( $link, $topic_id = 0) {
	//retrieve the topic object
	$topic = get_topic( get_topic_id( $topic_id ));

	//retrieve the forum object that is the topic container
	$forum = get_forum( get_forum_id( $topic-&#38;gt;forum_id ));

	//check for rewrite
	$rewrite = bb_get_option( &#38;#39;mod_rewrite&#38;#39; );
	if ( $rewrite ) {
		//what kind of rewrite there is? slug use &#38;quot;forum_slug&#38;quot; column, else the column is &#38;quot;forum_id&#38;quot;
		$column = ($rewrite === &#38;#39;slugs&#38;#39;)?(&#38;#39;forum_slug&#38;#39;):(&#38;#39;forum_id&#38;#39;);

		//create the &#38;quot;forum/pets-discussions&#38;quot; chunk to show the hierarchical relation forum-&#38;gt;topic
		$forum_nice_uri = &#38;quot;forum/&#38;quot; . $forum-&#38;gt;$column . &#38;quot;/&#38;quot;;

		//attach the hierarchical chunk to the link
		$link = str_replace(bb_get_option(&#38;#39;uri&#38;#39;), bb_get_option(&#38;#39;uri&#38;#39;) . $forum_nice_uri, $link);

		//	change /forum/pets-discussions/topic/my-sweet-dog in /pets-discussions/my-sweet-dog
		//		this work only if the rewrite module is modded!
		//		and this work only if the slugged name will NEVER
		//		be a reserved word like &#38;quot;rss&#38;quot; or &#38;quot;bb-images&#38;quot;
		//		and this is achieved by a filter on bb_slug_sanitize
		$link = str_replace(&#38;#39;forum/&#38;#39; . $forum-&#38;gt;$column , $forum-&#38;gt;$column, $link);
		$link = str_replace(&#38;#39;topic/&#38;#39; . $topic-&#38;gt;$column , $topic-&#38;gt;$column, $link);
	}

    return $link; // Very important line!
}

add_filter( &#38;#39;get_topic_link&#38;#39;, &#38;#39;my_get_topic_link_filter&#38;#39; );

function my_bb_slug_sanitize_filter( $text_slug, $text_original = &#38;#39;&#38;#39;, $length = 0 ) {
	// add &#38;quot;r-&#38;quot; by regex when the string begins with &#38;quot;bb-&#38;quot; or &#38;quot;my-&#38;quot; or is a reserved word
	return preg_replace(&#38;#39;/^(my-.*&#124;bb-.*&#124;rss&#124;tags&#124;view&#124;profiles)$/&#38;#39;, &#38;#39;r-&#38;#39;, $text_slug);
}

add_filter( &#38;#39;bb_slug_sanitize&#38;#39;, &#38;#39;my_bb_slug_sanitize_filter&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And there's the rewrite rules! ATTENTION!!!!! these rules are for IIS isapirewrite, so these are to be modded to work with apache! sorry but I don't have any apache installation to play with. It's a simple task, anyway. Every regex guru and regex accolite can do that. Even a regex wannabe can find out googling.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;#	first we rewrite the pages for normal slug-rewrite usage

RewriteRule /bbpress/tags/([^/\?]+)/page/([0-9]+)(?:\?(.*))? 					/forum2/tags.php\?tag=&#38;#38;page=?3&#38;#38;: [I,L]
RewriteRule /bbpress/tags/([^/\?]+)/?(?:\?(.*))? 								/forum2/tags.php\?tag=?2&#38;#38;: [I,L]
RewriteRule /bbpress/tags/?(?:\?(.*))? 									/forum2/tags.php(?1\?:) [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/page/([0-9]+)(?:\?(.*))? 				/forum2/profile.php\?id=&#38;#38;page=?3&#38;#38;: [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/([a-z-]+)(?:\?(.*))? 					/forum2/profile.php\?id=&#38;#38;tab=?3&#38;#38;: [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/([a-z-]+)/page/([0-9]+)(?:\?(.*))? 	/forum2/profile.php\?id=&#38;#38;tab=&#38;#38;page=?4&#38;#38;: [I,L]
RewriteRule /bbpress/profile/([^/\?]+)/?(?:\?(.*))? 							/forum2/profile.php\?id=?2&#38;#38;: [I,L]
RewriteRule /bbpress/view/([a-z-]+)/page/([0-9]+)(?:\?(.*))? 			/forum2/view.php\?view=&#38;#38;page=?3&#38;#38;: [I,L]
RewriteRule /bbpress/view/([a-z-]+)(?:\?(.*))? 							/forum2/view.php\?view=?2&#38;#38;: [I,L]
RewriteRule /bbpress/rss/(?:\?(.*))? 									/forum2/rss.php\?1&#38;#38;: [I,L]
RewriteRule /bbpress/rss/forum/([0-9]+)(?:\?(.*))? 						/forum2/rss.php\?forum=?2&#38;#38;: [I,L]
RewriteRule /bbpress/rss/topic/([0-9]+)(?:\?(.*))? 						/forum2/rss.php\?topic=?2&#38;#38;: [I,L]
RewriteRule /bbpress/rss/tags/([a-z-]+)(?:\?(.*))? 						/forum2/rss.php\?tag=?2&#38;#38;: [I,L]
RewriteRule /bbpress/rss/profile/([0-9]+)(?:\?(.*))? 					/forum2/rss.php\?profile=?2&#38;#38;: [I,L]

#	then we have a rule for special words, so they are left as they are, and the isapi module does not proceed further

RewriteRule /bbpress/(my-.*&#124;bb-.*&#124;rss&#124;tags&#124;view&#124;profiles)(/.*)?		/forum2/ [I,L]

#	then we have the forum and topic rules.
#	ATTENTION: we DO NOT rewrite a dottet word, because dotted words can be files like style.css and so on

#	before there are the topic rewrites, that are longer
#	ATTENTION: note that the forum name is totally skipped trough ?: notation. In facts, bbpress doesn&#38;#39;t need the forum name when reading a topic
RewriteRule /bbpress/(?:[^\./\?]+)/([^\./\?]+)/page/([0-9]+)(?:\?(.*))? 	/forum2/topic.php\?id=&#38;#38;page=?3&#38;#38;: [I,L]
RewriteRule /bbpress/(?:[^\./\?]+)/([^\./\?]+)/?(?:\?(.*))? 				/forum2/topic.php\?id=?2&#38;#38;: [I,L]

#	and after there are the forum rewrites, that are shorter
RewriteRule /bbpress/([^\./\?]+)/page/([0-9]+)(?:\?(.*))? 				/forum2/forum.php\?id=&#38;#38;page=?3&#38;#38;: [I,L]
RewriteRule /bbpress/([^\./\?]+)/?(?:\?(.*))? 							/forum2/forum.php\?id=?2&#38;#38;: [I,L]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And that's all. I hope someone can use this plugin :)&#60;/p&#62;
&#60;p&#62;Gus&#60;br /&#62;
email: shiawase at gmail dot com
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
