News:

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

Main Menu

SMF 2.0.14 — 403 Forbidden

Started by Lizorg, May 21, 2017, 02:03:53 AM

Previous topic - Next topic

Lizorg

Hello everyone,

I don't know what am I doing wrong, but every time that anyone tries to access my SMF website it firstly gets a 403 Forbidden error with the following message:

Forbidden

You don't have permission to access /index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


My PHP version is 5.4 by the way.

It merely happens when at the address bar of your browser appears this right:

/index.php?PHPSESSID=s77kvuufaepg4inmth28cqqrj6;wwwRedirect

Any suggestions? We have already tried the repair_settings.php, clearing browser cache, etc... Nothing worked so far.

Many thanks in advance. :P

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Lizorg

Hello!

Yup, I tried. Same thing happens (.htaccess file permissions are 705).

I have checked my SMF errors logs.

FIRST
Lizorg
Aplicar filtro: Mostrar sólo los mensajes de error de esta dirección IP 83.43.20.56   
Orden cronológico inverso de la lista Hoy a las 08:10
Aplicar filtro: Mostrar sólo los mensajes de error de esta sesión 3a3ddb9d2177756e4e212a71a6e28d62
Aplicar filtro: Mostrar sólo los errores de este tipo Tipo de error: Indefinidos
Aplicar filtro: Mostrar sólo los mensajes de error de esta URLhttp://www.blacksquad.es/index.php?wwwRedirectAplicar filtro: Mostrar sólo los mensajes de error con este mensaje8: Undefined index: st_background_positionAplicar filtro: Mostrar sólo los errores de este archivo Archivo: /home/rje2ggbd/public_html/Themes/default/PortalArticles.template.php (html_above sub template - eval?)
Línea: 192


SECOND
Lizorg
Aplicar filtro: Mostrar sólo los mensajes de error de esta dirección IP 83.43.20.56   
Orden cronológico inverso de la lista Hoy a las 08:10
Aplicar filtro: Mostrar sólo los mensajes de error de esta sesión d01a476f6e8b4b4462eb89df5551b942
Aplicar filtro: Mostrar sólo los errores de este tipo Tipo de error: Indefinidos
Aplicar filtro: Mostrar sólo los mensajes de error de esta URLhttp://www.blacksquad.es/index.php?http://www.blacksquad.es/Aplicar filtro: Mostrar sólo los mensajes de error con este mensaje8: Undefined index: st_background_positionAplicar filtro: Mostrar sólo los errores de este archivo Archivo: /home/rje2ggbd/public_html/Themes/default/PortalArticles.template.php (html_above sub template - eval?)
Línea: 192


THIRD
Lizorg
Aplicar filtro: Mostrar sólo los mensajes de error de esta dirección IP 83.43.20.56   
Orden cronológico inverso de la lista Hoy a las 08:10
Aplicar filtro: Mostrar sólo los mensajes de error de esta sesión d01a476f6e8b4b4462eb89df5551b942
Aplicar filtro: Mostrar sólo los errores de este tipo Tipo de error: Indefinidos
Aplicar filtro: Mostrar sólo los mensajes de error de esta URLhttp://www.blacksquad.es/index.php?action=admin;area=featuresettingsAplicar filtro: Mostrar sólo los mensajes de error con este mensaje8: Undefined index: st_background_positionAplicar filtro: Mostrar sólo los errores de este archivo Archivo: /home/rje2ggbd/public_html/Themes/default/languages/SPortalHelp.spanish_es-utf8.php (html_above sub template - eval?)
Línea: 192


FOURTH:
Lizorg
Aplicar filtro: Mostrar sólo los mensajes de error de esta dirección IP 83.43.20.56   
Orden cronológico inverso de la lista Hoy a las 08:10
Aplicar filtro: Mostrar sólo los mensajes de error de esta sesión d01a476f6e8b4b4462eb89df5551b942
Aplicar filtro: Mostrar sólo los errores de este tipo Tipo de error: Indefinidos
Aplicar filtro: Mostrar sólo los mensajes de error de esta URLhttp://www.blacksquad.es/index.php?action=admin;area=logs;sa=errorlog;desc;e6853e9=d01a476f6e8b4b4462eb89df5551b942Aplicar filtro: Mostrar sólo los mensajes de error con este mensaje8: Undefined index: st_background_positionAplicar filtro: Mostrar sólo los errores de este archivo Archivo: /home/rje2ggbd/public_html/Themes/default/Errors.template.php (html_above sub template - eval?)
Línea: 192


Sorry about the Spanish. :(

The log registers the same error every time we try to access the website and get that 403 Forbidden.

Best regards,

Gluz

Does your site base url have the www. in it? do you have any redirection in the .htaccess to redirect the url to www.?

The .htaccess should have 644 file permissions.

The other errors in the SMF error log doesn't have anything to do with the HTTP 403 error, and you need to check them afterwards.

Lizorg

#4
Hello,

Sorry I haven't thanked all the support you gave me so far. :(

Yes, my site base URL does have the www. in it. And now it has 644 as file permissions.

EDIT: By removing the www. from the site base URL the problem seems to be fixed. Should I contact my hosting provider and ask them? Or what should I do?

On my .htaccess file, the only thing I have on it is:

<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The next part below probably is not needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>


As stated on the first link that vbgamer45 shared with me.

Many thanks in advance!

Kindred

The point here is that you have your forum set up to use one (either www or non-www) but you are trying to access from the other.
The forum can handle it (hence, the wwwredirect in the URL) but your server configuration does like that...

So, you should use htaccess to force all users to whichever format you have decided to use... (instructions are easily googled)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Lizorg

Hello,

If I do that, well, I start getting some 500 errors. Anyways, I have fixed the problem by removing the www. from each URL including site base ones. Is there any difference between with www. and without www.? If not then I'll just leave it without www. and forget about this.

Best regards.

Kindred

You will probably now get the same error if you go to the www version of the url
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: