Trying to use Apache re_write to modify my tree structure

New to mod_rewrite? This is a good place to start.

Trying to use Apache re_write to modify my tree structure

Postby alastor » Wed Oct 14, 2009 3:44 am

Hi,
I have installed Wordpress and BBpress.
Because of seamless loggon BBPRess must be installed under Wordpress.
But my customer needs an url like this

http://company/forum

and not

http://comany/blog/forum

My first guess was to put an .htaccess file in /form with this code

RewriteEngine On
RewriteRule ^$ /blog/forum/$1 [L]

But when BBPREss starting I get an 404 page not found for included page in index page.
My guess is that BBpress uses it's BB_home_url in some way and this is a problem for me.

Anyone has an solution to my problem.

Regards Håkan[/img]
alastor
 
Posts: 5
Joined: Wed Oct 14, 2009 3:33 am

Postby richardk » Wed Oct 14, 2009 4:01 am

Do you have Wordpress's default mod_rewrite in /.htaccess?

My guess is that BBpress uses it's BB_home_url in some way and this is a problem for me.

Have you tried changing it to /forum? Also try it without the mod_rewrite.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby alastor » Wed Oct 14, 2009 4:16 am

No I don't have anything in my .htaccess file in my wordpress directory.
Can you explain what you mean by chaing to /forum?
Regards Håkan
alastor
 
Posts: 5
Joined: Wed Oct 14, 2009 3:33 am

Postby richardk » Wed Oct 14, 2009 4:33 am

No I don't have anything in my .htaccess file in my wordpress directory.

Then try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^(.*)$ /blog/forum/$1 [QSA,L]

in /forum/.htaccess.

an you explain what you mean by chaing to /forum?

You said there is a variable BB_home_url that i would presume is set to something like /blog/forum. Try changing it to /forum (ie. remove /blog from it).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby alastor » Wed Oct 14, 2009 4:48 am

Sorry but I still getting same error.
BBress starts and this is the output in page


BBPress Header
Page not found!
I'm sorry, but there is nothing at this URL.
BBPress Footer

Seams like BBPress can't show my forum topics.

Have I missed to update anything in BBPress?

I'f I go by my http://company/blog/forum everthing looks nice.
alastor
 
Posts: 5
Joined: Wed Oct 14, 2009 3:33 am

Postby alastor » Wed Oct 14, 2009 4:51 am

If I cange your [QSA,L]

with [R]

evering starts ok but then my url looks like this

http://company/blog/forum

I want it to be

http://company/forum

Maybe it helps :-)

Regards Håkan
alastor
 
Posts: 5
Joined: Wed Oct 14, 2009 3:33 am

Postby alastor » Wed Oct 14, 2009 5:00 am

IT helped with change bb url to /forum. Then url working fine.
Thanx.

But now my seamless loggon not working any more.
Does anyone has an idea how to fix this?
Can't theese to thing be combinded?

/forum
/blog
+
seamless logon ??

Regards Håkan
alastor
 
Posts: 5
Joined: Wed Oct 14, 2009 3:33 am

Postby richardk » Wed Oct 14, 2009 2:25 pm

I would guess the cookie path is set to /blog/ and needs setting to / instead. I have no idea how to change it in Wordpress or BBPress.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 3 guests

cron