bbpress mod_rewrite Woes



I don’t know if you’re familiar with bbpress, it’s the forum cousin of wordpress and can integrate nicely into the wordpress database to allow users to be shared across the two installs. So, on my North Carolina Genealogy site and my South Carolina Genealogy site I have bbpress forums installed. The catch is I wanted everything accessible through forums.domain.tld for each one. This worked with a simple config.php edit on the North Carolina site, but not the South Carolina Genealogy Forum. I kept getting 404 errors. So, I spent a couple hours chasing .htaccess Nothing I tried worked, I copied working files from one to the other, I looked at httpd.conf settings.


I tried copying the bbpress rewrite-rules.php output into an .htaccess file, tried putting the bbpress rules into the root directory .htaccess file… nothing… finally I noticed ONE thing that the two setups differed on.

The northcarolina site where the forums subdirectory was configured the path was /var/www/html/forum

(in httpd.conf)

on the southcarolina site it was set to be using /home/southcarolinagenealogy/www/forum …..

AHA – that’s a link – so I set it to the real path /var/www/html/forum and restarted the server and FINALLY got the nice mod-rewrite looking links working.

My next problem though was that I had created 92 or so links in the format of www.southcarolinagenealogy.org/forum/forum/name_of_county_forum… which now didn’t work, because the new links are at forums.southcarolinagenealogy.org/forum/name_of_county_forum …. so .htaccess time again.

I finally came up with this which worked.

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^forums.southcarolinagenealogy.org$ [NC]
RewriteRule ^(.*) http://forums.southcarolinagenealogy.org/$1 [QSA,L,R=301]

The idea is if the link does NOT already have the forums.southcarolinagenealogy.org address, then it will convert it to that and give a 301 redirect. After that bbpress was able to find the right place to redirect to. After reading through the URL Rewrite guide from Apache, I’m beginning to wonder what you CAN’T do with mod-rewrite.

Related Posts

Blog Traffic Exchange Related Posts
  • Share This Plugin not Working in Some Themes I've started adding the Share This plugin to several of my sites and was frustrated on one site to see on the front page "SHARETHIS.addEntry(" and a lot more ugly text. Upon investigation the < script tag enclosing the SHARETHIS javascript. So, I went on an investigation. I looked in......
  • New site domain www.computerrepairasheville.com Just by way of information..... I've seperated out the www.computerrepairasheville.com and www.ashevillecomputerhelp.com domains now to point to a seperate web site with the main goal of simplifying and clarifying my computer services in the Asheville, NC area. I'll keep the brief page on this site that gives an overview, but......
  • BBpress integration with Wordpress I've started the process of upgrading several websites to the newest release of Wordpress and one of the things that became possible was installing bbpress. If you don't know what I'm talking about, wordpress is the "blogging" software that I use for this and several other sites. It makes adding......
Blog Traffic Exchange Related Websites
  • Producing Inlinks When your website is crawled by search engine spiders, they will assess how much worth is attributed to each link. When the link building at issue is from a highly reputable website with an above average page rank it will carry more importance. An important factor to consider when......
  • Forum Marketing Tips For Marketing Your Online Business Free Forum marketing is one of the cheapest source of marketing your online business. This gives the flexibility for you to show your business and your brand before the crowd of targeted audience. Because most of the forum users are real experts and also beginners in that forum topic. So you......
  • Linking And Building Links - How To Work With SEO With Great Effect There are many talks about SEO and links building. In case you want to stop this debate for yourself and in case you need more tips how to deal with link building. I also want to show you some black sides of links building. So, let us count outs you......
www.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site