bbPress mod_rewrite elendighed



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. Så, on my North Carolina Slægtsforskning websted og min South Carolina Genealogi 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 fejl. Så, 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… intet… 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 linkso 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_forumwhich 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.

Relaterede Stillinger

Blog Traffic Exchange Relaterede Stillinger
  • Være forsigtige på nettet ... Incidents.org således rapportere om defacement af en sikkerhedsrelateret hjemmeside (winsnort.com). De siger, de normalt falde til kommentere dem, fordi opmærksomheden er, hvad defacers trives på. Men, Det kan betale sig at holde din browser opdateret og antivirus strøm. What's more.... Several days ago there was......
  • Hvor blev Expert Mode gå på min WESTELL DSL-modem? Min bror gør en række ting, som jeg gør, herunder forreste linje af beskæftiger sig med dagens teknologi. Det betyder, at søger at opkald om DSL-modem udfald og problemer. Nå, he was passing along that in the last several days he's come across several Bellsouth AT&T DSL customers with......
  • BbPress integration med 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 er "Blogging" software, som jeg bruger til dette og flere andre sites. It makes adding......
Blog Traffic Exchange Related Websites
  • Getting Backlinks To Your Site No doubt one of the most important things you can do for yourself if you are building  network marketing blogs is getting links back to your site. To be honest with you Network Marketing is a very hard keyword phrase to get ranked for.  If you are just getting started......
  • Lending Club Forum Having just signed up for Lending Club, my bank account has not yet been verified.  So, I have no money to bid on listings.  What am I do do? Cruise on over to the Lending Club forum.  Read up on the community.  Discuss my upcoming lending strategy.  But WAIT! Der ......
  • Net besøgende Era - Få Wise Med hensyn til web site Besøgende Generation For at charme kvalitet trafik til et bestemt websted, det er meget vigtigt, du vide, hvilke strategier til at vedtage, Hvis din er kreative nok kunne de aldrig løber tør for ideer til, hvordan at have potentielle besøgende til webstedet. De fleste mennesker er hjulpet af det indtryk, at ......
www.pdf24.org    Send artikel som PDF   

Lignende Indlæg


Se hvad der skete denne dag i historien fra enten BBC Wikipedia
Søg:
Nøgleord:
Amazon Logo

Kommentarer er lukket.


Skift til vores mobile site