MyBB Community Forums
[Error Message] forum links direct to wordpress 404 - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [Error Message] forum links direct to wordpress 404 (/thread-168846.html)



forum links direct to wordpress 404 - zachi132 - 2015-03-24

All my forum links lead to 404 in my main website Error not found links?

Don't know why, any way to solve this?

link: http://mymartialarts.net/forum/index.php?my_post_key=9305a1ecec44b808683ea1ecb23dce8d&language=english

thanks for the help.

*tried to change htaccess.txt to .htacess and it made the forum links to go .html from .php and still didnt work.


RE: forum links direct to wordpress 404 - Crazycat - 2015-03-24

The MyBB rewrite rules are overriden by the wordpress one, you probably have to add an exclusion (in the wordpress .htaccess) for the forum directory, or add the mybb rewrite rules in the wordpress .htaccess.


RE: forum links direct to wordpress 404 - zachi132 - 2015-03-24

(2015-03-24, 10:56 AM)Crazycat Wrote: The MyBB rewrite rules are overriden by the wordpress one, you probably have to add an exclusion (in the wordpress .htaccess) for the forum directory, or add the mybb rewrite rules in the wordpress .htaccess.

how can I make an exclusion in the wordpress .htaccess, what to write?.

thanks for the help.


RE: forum links direct to wordpress 404 - Crazycat - 2015-03-24

You can try adding, at the beginning of your wordpress rewrite-rules:
RewriteCond %{REQUEST_URI} !^/forum/.*$

And don't forget to rename the MyBB htaccess.txt into .htaccess


RE: forum links direct to wordpress 404 - zachi132 - 2015-03-24

(2015-03-24, 12:01 PM)Crazycat Wrote: You can try adding, at the beginning of your wordpress rewrite-rules:

RewriteCond %{REQUEST_URI} !^/forum/.*$

And don't forget to rename the MyBB htaccess.txt into .htaccess

Hey,
Tried that but the links doesnt work it turnes from .php to .html , like: http://mymartialarts.net/forum/forum-2.html
and its still a 404 page.

any ideas?


RE: forum links direct to wordpress 404 - Crazycat - 2015-03-24

You can try to put the rules from the MyBB .htaccess in the Wordpress .htaccess, after having removed the line I suggest you, and with a small correction:
	RewriteRule ^forum/forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^forum/forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

	RewriteRule ^forum/thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
	RewriteRule ^forum/thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^forum/thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^forum/thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^forum/thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^forum/thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^forum/thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

	RewriteRule ^forum/post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

	RewriteRule ^forum/announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

	RewriteRule ^forum/user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

	RewriteRule ^forum/calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^forum/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^forum/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
	RewriteRule ^forum/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

	RewriteRule ^forum/event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

If it doesn't work, show us your Wordpress .htaccess file


RE: forum links direct to wordpress 404 - zachi132 - 2015-03-24

(2015-03-24, 01:33 PM)Crazycat Wrote: You can try to put the rules from the MyBB .htaccess in the Wordpress .htaccess, after having removed the line I suggest you, and with a small correction:

 RewriteRule ^forum/forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
 RewriteRule ^forum/forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

 RewriteRule ^forum/thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
 RewriteRule ^forum/thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
 RewriteRule ^forum/thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
 RewriteRule ^forum/thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
 RewriteRule ^forum/thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
 RewriteRule ^forum/thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
 RewriteRule ^forum/thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

 RewriteRule ^forum/post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

 RewriteRule ^forum/announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

 RewriteRule ^forum/user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

 RewriteRule ^forum/calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
 RewriteRule ^forum/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
 RewriteRule ^forum/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
 RewriteRule ^forum/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

 RewriteRule ^forum/event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

If it doesn't work, show us your Wordpress .htaccess file

Hey,
Thanks for the help I ended up removing some of the original wordpress .htaccess file, a plugin blocked the link.