Closed aendra-rininsland closed 10 years ago
Apache is still the most used server, and that file has the most common rules to make sites better. If your project doesn't need it, remove it from your app folder.
@eddiemonge Not to be obtuse, but the point about Apache's market share is kind of irrelevant. That .htaccess makes some very specific assumptions, and is based on the HTML5 Boilerplate .htaccess. Neither Bootstrap nor AngularJS (the two main dependencies of this generator) come with any sort of .htaccess file. I honestly have no issue whatsoever with Apache; I use it quite frequently myself. I'm more worried about a hidden file screwing up configurations and being hard to troubleshoot.
Again, .htaccess is a hidden file and it's not in the project root — it's in the app/ folder. I've built half a dozen things with this generator and honestly had no idea that file was there.
If deleting it altogether is too harsh, might I suggest an alternative? Rename it to htaccess.txt
. That way, users who want to make use of it can simply rename it to .htaccess and it's more visible. Thoughts?
It should probably be switched to match what we did in generator-webapp, but that still leaves it as .htaccess
You are right that it is based on the H5BP. A lot of time and experience has gone into making it is what it is based on a lot of feedback so I don't want to change anything on it.
@eddiemonge Fair enough. It probably really only caused me problems because my generator-angular
-based project gets pulled into a WordPress plugin via Bower as a dependency, and was conflicting with WordPress' .htaccess
as a result. If anything, it's just a bit surprising that it's there, considering one generally doesn't think of AngularJS as having anything server-side involved.
Thanks for getting back to me!
the team talked a little about this today. nothing resolved came out of it but the idea is floating around now
I think we should reconsider this. We did it for both generator-webapp and gulp-webapp: https://github.com/yeoman/generator-webapp/pull/498 and https://github.com/yeoman/generator-gulp-webapp/pull/262.
The app/ folder has a really bizarro .htaccess file, which totally had me and three IT folks scratching their heads about why stuff was redirecting to a different domain (It strips the "www" from domains or something).