MyBB Community Forums

Full Version: 404 error after installing wordpress
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys, I hope you are doing well..

SO I have installed MyBB inside subdir: /bb/ and the wordpress inside main root folder.. 
http://prntscr.com/su7g5f

MyBB index is fine but images are broken and giving me 404 error or page not found?!!

I will share both .htaccess
:: Wordpress one located inside main wordpress folder or root folder
# BEGIN WordPress
# التعليمات (الأسطر) بين `BEGIN WordPress` and `END WordPress`
# تم إنشاؤها ديناميكيًا، ويجب تعديلها فقط من خلال مرشحات ووردبريس (WordPress Filters).
# أي تغييرات على التعليمات بين هذه العلامات سيتم الكتابة فوقها.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Second MyBB one: Located inside mybb root folder /bb/
RewriteEngine on



# Some hosts require RewriteBase to make RewriteRules work.

RewriteBase /bb/



# Google SEO workaround for search.php highlights:

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

RewriteRule ^([^&]*)&(.*)$ https://alnassiri.com/bb/$1?$2 [L,QSA,R=301]



# Google SEO 404:

ErrorDocument 404 /bb/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]


Thank you Smile

Update// I removed htaccess of MyBB folder, I couldn't even access index all mybb thing disappered, After enabling it again mybb index came back to its normal but Images or all images still broken
You have to add a rule in the wordpress' .htaccess (before other rules) to exclude your MyBB folder:
RewriteRule ^bb/(.*)$ - [L]
(2020-06-05, 09:07 AM)Crazycat Wrote: [ -> ]You have to add a rule in the wordpress' .htaccess (before other rules) to exclude your MyBB folder:
RewriteRule ^bb/(.*)$ - [L]

IF you mean this way:

RewriteEngine On
RewriteBase /
RewriteRule ^bb/(.*)$ - [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

it doesn't work, still all images are broken and show not found (WP Page)
Seems ok for me, no 404 error in WP, and one in /bb/ (skin.css).
Did you empty your cache (ctrl + F5) ?
(2020-06-05, 09:41 AM)Crazycat Wrote: [ -> ]Seems ok for me, no 404 error in WP, and one in /bb/ (skin.css).
Did you empty your cache (ctrl + F5) ?

Can you take a look here: https://www.alnassiri.com/bb/ 

Yep, I have tried everything removing htaccess and then adding it back, adding your rule and  Huh
Really strange, everything work fine but images (404 with https://www.alnassiri.com/bb/images/default_avatar.png)
Is your images/ directory well uploaded and readable ? And it's contents too ?

Can you try disabling the two .htaccess and check if the forum works well ?
(2020-06-05, 10:14 AM)Crazycat Wrote: [ -> ]Really strange, everything work fine but images (404 with https://www.alnassiri.com/bb/images/default_avatar.png)
Is your images/ directory well uploaded and readable ? And it's contents too ?

Can you try disabling the two .htaccess and check if the forum works well ?

The forum is fine after disabling both htaccess but image error changed to 403 Forbidden this: 
http://prntscr.com/sua1ke 


Image folder perm 700 and images itself 644 all good not sure what is going on.
Have you checked the permission documentation to ensure you have them set correctly? https://docs.mybb.com/1.8/administration...rmissions/
image folder might be 755
(2020-06-05, 10:14 AM)Crazycat Wrote: [ -> ]Really strange, everything work fine but images (404 with https://www.alnassiri.com/bb/images/default_avatar.png)
Is your images/ directory well uploaded and readable ? And it's contents too ?

Can you try disabling the two .htaccess and check if the forum works well ?

(2020-06-05, 10:33 AM)Ben Wrote: [ -> ]Have you checked the permission documentation to ensure you have them set correctly? https://docs.mybb.com/1.8/administration...rmissions/

Thank you for both of you replies, it was folder perm, Dk how the perm from 755 changed to 700.. I think this happened during uploading plugins. its working fine now Smile