MyBB Community Forums

Full Version: MyBB and Wordpress PHP conflict?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have Wordpress in the main root of the site so www.site.com and I have MyBB in www.site.com/Forum/

I moved host and started experiencing occassional problem where in some threads when I try to post I get a page not found error from wordpress.
you have to ensure that rewrite rules used for wordpress do not affect MyBB URLs (replies here might help)
I just did that, placed .htaccess in the wordpress root

RewriteRule ^Forum(/|$) - [L]


and I get:


Forbidden

You don't have permission to access /Forum/editpost.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Okay the 403 error was because the .htaccess got messed up. I regenerated from wordpress and here is the wordpress one with the added line for Forum but it still gives the 404 erorr from wordpress:

# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
</IfModule>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
    RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
</IfModule>
# END W3TC Page Cache core

# 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]
RewriteRule ^Forum(/|$) - [L]
</IfModule>

# END WordPress

Here is the MyBB .htaccess:

Options -MultiViews +FollowSymlinks -Indexes



RewriteEngine on



# Some hosts require RewriteBase to make RewriteRules work.

RewriteBase /Forum/



# Google SEO workaround for search.php highlights:

# Make this rule the first rewrite rule in your .htaccess!

RewriteRule ^([^&]*)&(.*)$ http://mysite.com/Forum/$1?$2 [L,QSA,R=301]



# Google SEO 404:

ErrorDocument 404 /Forum/misc.php?google_seo_error=404



# Google SEO Sitemap:

RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]



# Google SEO URL Forums:

RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]



# Google SEO URL Threads:

RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]



# Google SEO URL Announcements:

RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]



# Google SEO URL Users:

RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]



# Google SEO URL Calendars:

RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]



# Google SEO URL Events:

RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

#

# If Apache is compiled with built in mod_deflade/GZIP support

# then GZIP Javascript, CSS, HTML and XML so they're sent to

# the client faster.

#

<IfModule mod_deflate.c>

	AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml

</IfModule>

This is what I'm trying and while according to another forum this SHOULD work it doesn't.. but the funny thing is... it's ONLY happening on SOME posts and SOME threads.... generally the forum runs... but when i try to reply or post to some threads I get the wordpress based 404 errorr.

Someone give me a hand please

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

# END WordPress