MyBB Community Forums

Full Version: MyBB Search Engine URLS Not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Howdy!

I recently enable the myBB search engine friendly URLS and now I am getting page not found errors for all urls that were rewritten. The dynamic urls still work if I disable the search engine friendly urls.

You can see my forum here: http://goo.gl/9eJLI

Any help would be much appreciated.
Did you rename htaccess.txt to .htaccess?
(2012-12-14, 11:36 PM)Nathan Malcolm Wrote: [ -> ]Did you rename htaccess.txt to .htaccess?

Hi Nathan,

The .htaccess file was already renamed. Here's what it looks like:

Options -MultiViews +FollowSymlinks -Indexes

#
# 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>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
# the setting enabled in the Admin CP and you have this file
# named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

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

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

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

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

RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^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 ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

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

<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>

#
# 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>
Hi guys just wondering if anyone has any ideas on how I might fix this?
Are you sure you renamed the htaccess.txt file to .htaccess in your forum's directory?

Do you have any plugins installed such as Google SEO?
(2012-12-22, 01:12 AM)Kodaks Wrote: [ -> ]Are you sure you renamed the htaccess.txt file to .htaccess in your forum's directory?

Do you have any plugins installed such as Google SEO?

Hi Kodak,

Yes I am 100% that the htaccess file has been renamed in the forum directory. No I don't have any other plugins installed.

Thanks,
Jeff
(2012-12-22, 01:12 AM)Kodaks Wrote: [ -> ]Are you sure you renamed the htaccess.txt file to .htaccess in your forum's directory?

Do you have any plugins installed such as Google SEO?

Mine says Destination already exists when i try to change it to .htaccess
(2012-12-14, 11:26 PM)jeffalex Wrote: [ -> ]I recently enable the myBB search engine friendly URLS and now I am getting page not found errors for all urls that were rewritten.
I suppose you have forum installed in sub folder 'forum', therefore try this :
- your mybb .htaccess file should be in 'forum' folder (not in site root)
- after RewriteEngine on directive, put RewriteBase /forum directive.
So it would look like this :
RewriteEngine on
RewriteBase /forum
Dont forget to enable in forum's ACP :
Configuration -> Settings -> Server and Optimization Options -> Enable search engine friendly URLs -> 'Enabled'
Try if it help.

@MYBB GHOST
(2012-12-22, 07:08 AM)MYBB GHOST Wrote: [ -> ]Mine says Destination already exists when i try to change it to .htaccess
Destination already exsist - meant there is already file with .htaccess name in this folder.
To succesfuly rename your htaccess.txt you must first delete this other .htaccess file however this other file may be invisible (hidden) when you look at it throught FTP.
Enable 'show hidden files' option in FTP client first.
Hi Avril,

Adding the RewriteBase /forum solved the problem!

Big Grin

Thanks so much.