george on 8 Dec 2017 17:47:01 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] My domain's .htaccess file is giving me fits (Charlie Li)


Hello Charlie, Rich & plug -

Charlie wrote in reply:

On 7 December 2017 18:26:21 GMT-05:00, Rich Kulawiec wrote:

The place to do this is in the perimeter router and/or in the firewall, not at the web server. Why? (1) it's easier (2) it's more efficient

I almost suggested almost exactly this, but I had a feeling George doesn't
have access to anything lower than .htaccess.
Charlie Li
Sent from Android

You betcha - trapped on a shared server. My ISP hadn't even told me about
the change in server S/W until I pestered them.

But all is not lost ... On Dec.6 I sent an email to cPanel's support team
about the obfuscation caused by the conversion of IP addresses to their
canonical names, which gave generic names like example.com which aren't
parsable, and _within hours_ the conversion stopped. Maybe a coincidence ?

That changed the problem of one to fix my .htaccess file, which I did by
truncating all the repetitive stuff (to eliminate typo's) and then
commenting out various sections until I could reload my domain's home page successfully, and then putting back stuff, one section at a time, until all
the errors were apparent. Google and the various Apache 2.4 assistance
pages helped immensely. I then rebuilt the full 100K .htaccess file and it
worked the first time.

One difficulty emerged: Cannot express the range of IP addresses at a server with the simple difference between the top and bottom of the range - it's either a single IP address or the CIDR notation, nothing else. I was left with one IP range for which neither whois nor Domain Dossier could tell me
the CIDR notation ... out of almost three thousand blocked IP's.

I also found a bit of nastiness that had crept in:

<Files 403.shtml>
order allow,deny
allow from all
</Files>

No one likes this ...Don't let anyone under the age of consent see it ...

Now I see a lot of 403 responses in my Recent Visitors logs; those had
disappeared with the use of the former versions of .htaccess and cPanel.

Best regards,
George Langford
george@georgesbasement.com
http://www.georgesbasement.com/

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug