News:

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

Main Menu

Not Acceptable Error and Connection Error

Started by Greyhound, January 21, 2024, 09:55:43 AM

Previous topic - Next topic

Greyhound

I am running 2.1.4.  Newly installed in October of last year. 

I'm running Tiny Portal, Users online today and Topic Solved Mods.  I'm also running Steyle_V1 them.   I have a SSL cert on my site and I'm running Force SSL throughout the forum. 

What is happening is people using chrome when they go to regular http:// or just mydomain.com, when they click on the forum link from the home page it produces the below error: 

Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

In some cases users are getting

This site can't be reached

xxx.com refused to connect. 

Try: 
Checking the connection

ERR_CONNECTION-REFUSED

Again, I believe most of the errors are people using Chrome.  I don't personally use Chrome (too many random issues due to changes) but I can't force others not too. 

Any suggestions?  I've read that I may need to do a .htaccess change to force everything to htpps even if they don't type it.  I wanted to check here before doing anything. 

Thanks! 



Arantor

You will need to use .htaccess - the issue is that the server firewall refuses to accept HTTP-not-secure.

Alternatively ask your host how to set it up so it redirects.
Holder of controversial views, all of which my own.


Greyhound

I asked my host and they did something that broke the sites.   I asked them to undo it.  

Is there recommended code and a specific location in .htaccess to help force everyone to https? 

Arantor

No specific location, but the recommended code isn't quite the same for every server.

The fact your host appears to be incompetent would suggest it's time to look for better hosting.

Thing is, I'm not *sure* that htaccess will fix it if it's failing on mod_security...
Holder of controversial views, all of which my own.


Sir Osis of Liver

You can try this in forum root -


# 301 REDIRECT HTTP TO HTTPS AND WWW TO NON-WWW
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
</IfModule>


May be able to disable mod_security in control panel, or ask host to disable it (good luck).

Quote from: Arantor on January 21, 2024, 11:50:05 AMThe fact your host appears to be incompetent would suggest it's time to look for better hosting.

^ This.

When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: