Support

Admin Tools

#22404 am I safe to upload HTML5 Boilerplate .htaccess

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Friday, 03 April 2015 02:33 CDT

UglyEoin
 Hi Nicholas,

I hope you're well.

I'm trying to improve the speed of my site, and I thought I would take a steer from HTML5 Boilerplate.

I note that you include some of the stuff already, but do you think there is anything wrong with using their .htaccess file combined with yours?

https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess

I think there are some things that you haven't included so I think I'd like to add them if possible. As far as I'm concerned you're the expert here.

Eoin

nicholas
Akeeba Staff
Manager
Please bear in mind that the .htaccess file you have found does not include front-end and back-end protection for Joomla!. It's best to nit-pick the additional features you want and add them as custom .htaccess code to be added at the top or bottom of the file.

Also bear in mind that you MUST NOT include sections of code which perform the same function as an existing .htaccess Maker feature. For example "Error prevention", "REWRITES", "Forcing `https://`", "Suppressing / Forcing the `www.` at the beginning of URLs", "File access", "Block access to all hidden files and directories", "Block access to files that can expose sensitive information", "HTTP Strict Transport Security (HSTS)", "Compression", "ETags", "Expires headers" will definitely conflict with .htaccess Maker. I've not tested the other sections, I can't tell you if they will work or not.

Some sections rely on Apache features which may be blocked by shared hosts. In this case your site will display an error 500 or blank page. Please do not request support for this situation :) Once you add custom code to the .htaccess Maker we can't provide support for it (unless "please remove all custom code first" sounds like a support option, because that's the first thing we'll ask you to do).

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

UglyEoin
Thanks, I had worked my way through a bit of that myself. Do you have any idea as to why http://gtmetrix.com/reports/squareballoon.co.uk/YX1hrBnT is showing as "etags" not set up and expires headers not set up? There's a few options that it's grumbling about but they seem to be covered by the .htaccess file so that confuses me.

nicholas
Akeeba Staff
Manager
A word of caution: do not touch ETags, no matter what "site optimisation" tools tell you. Disabling ETags can have an adverse effect to browser-side caching of content which is not explicitly cached through mod_expires. This is the case on your site. Apparently your host doesn't have Apache's mod_expires installed / activated. In this case ETags are used for browser-side caching!

This is not all that bad. Using ETags is only bad if you use a server cluster to serve the same site. When I see Joomla! and WordPress guys obsess over ETags my reaction is mild annoyance. People, you are NOT using a server farm to host your small Joomla! / WordPress site. You are using a SHARED HOST. This means that you don't use a hundred servers to serve the same site, you use one hundreth of a single server. ETags are bad in the former case, indifferent (or useful, in the lac of mod_expires!) in the latter. Do NOT treat site optimisation as a competition. A higher score for a test designed for massive sites hosted on thousands of servers does not mean that it's better for your small site. It could be a waste of your time or worse. Educate yourself and think.

Speaking of which, for more information on ETags please read: https://developer.yahoo.com/blogs/ydn/high-performance-sites-rule-13-configure-etags-7211.html

Stop worrying, start reading ;)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!