MyBB Community Forums

Full Version: MyBB .htaccess conflicting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Wordpress .htaccess keeps overiding mybb's so I can't actually get to the forum. Does anyone know how to modify the .htaccess to get them both to work?
Are they both in the same directory on your server?
Yes it's like this.

/promoforum (blog here)
/promoforum/omega (forum here)

However I need the page layout to be like this /promoforum/blogcategory
I meant the .htaccess files. Where specifically are they located on your server? Which folder/directory?
The wordpress file is in the wordpress directory but in the forum sub directory all there is the password protection in the htacess.
If you set up your hierarchy like this:

ROOT/blog/blog files + .htaccess
ROOT/forum/mybb files + .htaccess

There should be no conflict as .htaccess only affects it's present directory and children.

Can you post the contents of your .htaccess files?

Specifically what error are you being presented with when attempting to navigate to your forum?
Well this is confusing but the root directory for the domain of the site is /promoforum.

Wordpress:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

MyBB:

AuthType Basic
AuthName "Alpha"
AuthUserFile "/home/zingorwe/.htpasswds/public_html/promoforum/omega/passwd"
require valid-user

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
# MediaTemple, it is known to cause random Internal Server
# errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>

And the error is when I go to where the forum should be I get a wordpress 404 message.
.htaccess files affect their container and all child containers.

So, if you have a hierarchy that looks like this:

- ROOT / proforum / BLOG FILES

- ROOT / proforum / MyBB / FORUM FILES

Any .htaccess file assigned to the "root" or the "proforum" or the next folder down that contains both: the blog files and the mybb root folder is going to affect all of those child elements.

You really need three .htaccess files (if you want to not worry about conflicting between them).
An .htaccess file explicit to its container takes precedence over one inherited down through the hierarchy. (It's not as complicated as it sounds, trust me)

You need to make your structure look like this:

- ROOT /
--- BLOG /
------ Blog Files and Blog .htaccess file
--- FORUM /
------ Forum Fiiles and Forum .htaccess file

I know this isn't what you asked for, you were looking for a way to reconcile the two into one file. I'm not that good and this may be your better option if you have access to the folder structure to change it. It's very simple. You can keep the two .htaccess files exactly as is, simply by moving your blog and forum to independent child containers in the directory. If you can't do that, then you will need to try to craft a master .htaccess file that suits your needs. I'm not that good. Sorry if I've wasted your time. Smile
Thanks for your help but I need to know how to have them both in the same folder.
You cannot have them both in the same directory (folder).
Pages: 1 2