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
  • Where did Expert Mode go on my Westell DSL modem? My brother does a variety of things, as I do including the front line of dealing with todays technology. This means looking to calls about DSL modem outages and problems. Well, he was passing along that in the last several days he's come across several Bellsouth AT&T DSL customers with......
  • Ranking for a Search Phrase in Google I guess by now you've noticed that I'm not keeping up with the 1 post a week rate that I had for a while there. I've been thinking that at this point I'm going to be getting in one a month or so. More if the mood strikes, but from......
  • Wordpress Fancy Permalinks not working Giving 404 error I spent the better part of a Friday night sorting this out. I had just launched 4 new wordpress blogs that were secondary installs on each server. (I use a VPS and /home/domain/www/ was the primary wordpress install - the secondary installs existed at /home/domain/www/secondsite ) . The problem was......
Blog Traffic Exchange Related Websites
  • Kiva Forum P2P No Bank has launched independent forums covering all p2p lending sites — including Kiva.   Kiva lets you connect with and loan money to unique small businesses in the developing world. By choosing a business on Kiva.org, you can "sponsor a business" and help the world's working poor make great......
  • Gluten Intake and Difficulty Concentrating Gluten Intake and Difficulty Concentrating   Now I have a much greater idea about why sometimes I have a hard time concentrating.  It seems I might be the last person to hear that for persons with Celiac Disease, Difficulty Concentrating can be a symptom of gluten exposure.   There are......
  • Can Be There A Back-link Software Meant For Search Engine Optimization? Back-links, or back links, are a crucial building block inside the Search engine marketing (Web Optimization) process. Inbound links support engines like google to establish a web site's level of popularity nevertheless, simple one way links are usually not ample for boosting a website's rank in Search results (Search Engine......
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