2016-05-24, 12:50 PM
Hello,
I'm having some issues gettings the SEO Friendly URLs to work along with redirecting my forum's homepage to the portal. I'll start with detailing my issue with SEO URLs.
My current .htaccess contains the following:
I have checked my loaded modules and can confirm that I do have "mod_rewrite" loaded so that's not the issue. My forums is in the main directory and not a sub folder meaning RewriteBase shouldn't be the issue here either. I have also checked mod_security and can confirm that it isn't loaded. I have checked my error log and I'm only receiving "File does not exist" errors, I'll leave some examples of the errors below:
Onto my Portal issue now, as you can see from my .htaccess I have "DirectoryIndex portal.php" included however it simply doesn't work and I'm unsure if these issues are related.
When I enable SEO Friendly URL's I simply get "Not Found The requested URL was not found on this server" upon clicking any of my forums.
Test Forum Link: http://forums.universalplayground.uk
Any help at all is greatly appreciated, thanks.
I'm having some issues gettings the SEO Friendly URLs to work along with redirecting my forum's homepage to the portal. I'll start with detailing my issue with SEO URLs.
My current .htaccess contains the following:
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
RewriteBase /
DirectoryIndex portal.php
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>
I have checked my loaded modules and can confirm that I do have "mod_rewrite" loaded so that's not the issue. My forums is in the main directory and not a sub folder meaning RewriteBase shouldn't be the issue here either. I have also checked mod_security and can confirm that it isn't loaded. I have checked my error log and I'm only receiving "File does not exist" errors, I'll leave some examples of the errors below:
[Tue May 24 02:33:26 2016] [error] [client IPADDRESS(I've removed this IP)] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/ModRewrite.php on line 2
[Tue May 24 02:34:17 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/images/usercp/options.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:17 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/admin/styles/default/images/icons/error.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:17 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/admin/styles/default/images/icons/warning.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:17 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/admin/styles/default/images/icons/success.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:17 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/admin/styles/default/images/icons/custom.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:21 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/images/usercp/options.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:26 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/images/usercp/options.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:32 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/images/usercp/options.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:34:34 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/images/usercp/options.gif, referer: http://forums.universalplayground.uk/admin/index.php?module=config-plugins
[Tue May 24 02:36:04 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/forum-2.html, referer: http://forums.universalplayground.uk/index.php
[Tue May 24 02:37:37 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/forum-2.html, referer: http://forums.universalplayground.uk/index.php
[Tue May 24 02:37:38 2016] [error] [client IPADDRESS(I've removed this IP)] File does not exist: /var/www/html/forum-2.html, referer: http://forums.universalplayground.uk/index.php
Onto my Portal issue now, as you can see from my .htaccess I have "DirectoryIndex portal.php" included however it simply doesn't work and I'm unsure if these issues are related.
When I enable SEO Friendly URL's I simply get "Not Found The requested URL was not found on this server" upon clicking any of my forums.
Test Forum Link: http://forums.universalplayground.uk
Any help at all is greatly appreciated, thanks.