Not logged in. · Lost password · Register
Forum: Support General support RSS
Installing UNB in same directory as Wordpress
.htaccess issues
Droplister (Guest) #1
No profile available.
Link to this post
Subject: Installing UNB in same directory as Wordpress
My wordpress urls are like this: domain.com/page, I installed the forum at: domain.com/forum/, but I don't like how the urls are: domain.com/forum/forum/1.

I don't need to have the word forum twice. I thought the easiest fix would just be to move the install to the home directory, but it seems that the mod_rewrite of the two scripts don't jive. I couldn't find an answer searching the forum and docs and I'm new to UNB. I am not however new to Wordpress.

I would imagine there would be an issue between with wordpress thinking domain.com/forum was a page and not the forum's home page. There would be no issue if I could keep the install at domain.com/forum/ and just lose the extra forum.

Any advice?
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Yes, you can™ get rid of that extra "forum". Change the board configuration item (board.conf.php) "url_overview" from "forum" to "" (I guess, did that before but don't know it for sure right now) and update the board's .htaccess file accordingly as noted besides that config item. Then you get URLs like /forum/ and /forum/thread/123.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Droplister (Guest) #3
No profile available.
Link to this post
I changed

# Short URL to generate for the overview page (default is "forum"), see UnbLink function. Needs .htaccess file update!
url_overview = forum

to

# Short URL to generate for the overview page (default is "forum"), see UnbLink function. Needs .htaccess file update!
url_overview =

And I guessed at what changes need to be made in .htaccess.

Changing

    RewriteRule ^forum/([0-9]+)[^;]*(;(.*))?$ forum.php?req=main&id=$1&rewrite=$3 [L,QSA]

to

    RewriteRule ^/([0-9]+)[^;]*(;(.*))?$ forum.php?req=main&id=$1&rewrite=$3 [L,QSA]

But the links on the overview page are still forum/forum.

Where can I find the UnbLink function as I assume that's what need to be changed now.
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
From .htaccess:

# If the overview page has the URL ./ instead of ./forum, use this line:
#RewriteRule ^(forum)?(;(.*))?$ forum.php?req=main&rewrite=$3 [L,QSA]

No change to be done in any other code file. That's what the configuration option is there for finally.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 183 ms (95.8 ms) · 48 database queries in 136.7 ms
Current time: 2012-02-08, 09:02:02 (UTC +01:00)