News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

403 Forbidden after moving webhost

Started by dekoffieboer, May 24, 2015, 10:00:44 AM

Previous topic - Next topic

dekoffieboer

Hello everyone,

Forum: SMF 2.0.10 with SimplePortal 2.3.6

I have just moved webhost and i was told by various people that when they visit the domain without www they get redirected to for example "http://www.domain.com/index.php?PHPSESSID=721ea80a1c2fda491c914284784a61a8;wwwRedirect [nofollow]"

However, when this automatic redirection happens they get the error 403 Forbidden.
"You don't have permission to access /index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

When you visit the domain WITH www then everything is fine.

Does anyone know how to fix this?

Many thanks in advance. :)

JBlaze

Sounds like a server misconfiguration. Speak with your host, as this is not an SMF issue.
Jason Clemons
Former Team Member 2009 - 2012

dekoffieboer

Alright i will talk to the host then as well. I will update this topic if we resolved it.

a10

Check what's in .htaccess, this works on my forum:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.net
RewriteRule (.*) http://www.mydomain.net/$1 [R=301,L]
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

dekoffieboer

Quote from: a10 on May 24, 2015, 01:07:50 PM
Check what's in .htaccess, this works on my forum:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.net
RewriteRule (.*) http://www.mydomain.net/$1 [nofollow] [R=301,L]

Thank you! This works. Marking this topic as solved now.

margarett

Do note that this is probably caused by mod_security and, if that is the case, you will face the same 403 error again, with another cause...

Who is your new host, out of curiosity?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

dekoffieboer

Quote from: margarett on May 24, 2015, 02:37:09 PM
Do note that this is probably caused by mod_security and, if that is the case, you will face the same 403 error again, with another cause...

Who is your new host, out of curiosity?

Its www.arenahosts.com [nofollow]
I will ask them about the mod_security. So far their support is great and the site is fast, only having this issue.

edit: according to them it is indeed the mod security and i can turn it on or off through cpanel. For now i will leave it alone, and have the htaccess fix posted earlier. If it happens again with something else i will consider turning it off.

Advertisement: