A collection of useful .htaccess snippets
11–20 of 22 posts
Re: A collection of useful .htaccess snippets
#12https://github.com/h5bp/server-configs-apache/blob/master/di...
Re: A collection of useful .htaccess snippets
#13You can make good http(s) firewalls (albeit not fast as a IP one) against threats. Needs to add more to this, especially configs against SQL injections and other hacks.
Actually, I dont' think that is the webserver's job. Relying on your webserver to protect you against SQL injection is probably not what you want to do. The webserver has no knowledge at all about what kind of program you run behind it. You would need to teach it everything about what you're doing. Seriously, you are much better off just using prepared statements everywhere than trying to teach a webserver the finer…
Re: A collection of useful .htaccess snippets
#14While I think this is a very valuable resource, and patterns are always welcome by me, it should be noted that the Apache docs recommend against using .htaccess files due to the performance penalty. From the docs ( http://httpd.apache.org/docs/current/howto/htaccess.html ): You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apac…
Re: A collection of useful .htaccess snippets
#15While I think this is a very valuable resource, and patterns are always welcome by me, it should be noted that the Apache docs recommend against using .htaccess files due to the performance penalty. From the docs ( http://httpd.apache.org/docs/current/howto/htaccess.html ): You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apac…
Re: A collection of useful .htaccess snippets
#16Earlier quoted context omitted.
Actually, I dont' think that is the webserver's job. Relying on your webserver to protect you against SQL injection is probably not what you want to do. The webserver has no knowledge at all about what kind of program you run behind it. You would need to teach it everything about what you're doing. Seriously, you are much better off just using prepared statements everywhere than trying to teach a webserver the finer…
That's true, but sometimes (especially with completely naive or old PHP) 'using prepared statements everywhere' means 'rewriting everything.' In those cases, htaccess might be the only flexible option you have until you can.
Re: A collection of useful .htaccess snippets
#17While I think this is a very valuable resource, and patterns are always welcome by me, it should be noted that the Apache docs recommend against using .htaccess files due to the performance penalty. From the docs ( http://httpd.apache.org/docs/current/howto/htaccess.html ): You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apac…
These snippets should all be fine to go straight into a directory block, so it's still a really good resource,