-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application templates: missing .htaccess #2800
Comments
Probably a good idea. |
We should decide whether we only include rewrite rules or also any other useful configurations |
What do you mean by useful configurations? |
We could probably use html5-boilerplate .htaccess file |
Then what about nginx config example? We don't use Apache for years. |
we'd better use " php -S " to start native Server inside PHP for dev. |
@alphard-code nah, that's too much. @SonicGD it's in the docs. nginx doesn't read config files from webroot. @e6nian yeah, I need to add it to docs. |
@SonicGD Nginx is extremely simple to setup, much simplier than Apache actually and as @samdark says it doesn't actually read config files from inside the webroot. There is, of course, one downside to .htaccess, it is slow. That is why, on the Apache server we do have, it isn't used since it has to perform a new directory scan every single time, every single request. I kind of agree with the current setup, adding commented out line to the main.php config for the pretty URLs directing the user to a help page about it. |
Not every web server supports .htaccess. I suppose "out of the box" application examples should not bound to it. |
i would like to see this examples in docs like in Yii1 but better, so they will be simple copy-paste and running. Currently examples for example for nginx not working with such settings in yii config. |
@Ragazzo hmm, I'm using the same nginx config it and it works just fine. |
it works when you set |
Maybe .htaccess should be added to Gii, so every person who needs it can create it in one click. |
@samdark yes , i know about that old bug in php , but i was talking about correct config that is not working even with that fix . Will try later to figure out what is wrong ) |
@samdark
for develop by native build-in server inside php and add in index.php
so you can enable suffix in urlManager otherwise, you can copy a index-dev.php for develop. |
I wouldn't say it is best practice; the built in PHP server is meant for light testing only, it is not designed to replicate a production environment where either Lighttpd/Nginx or Apache would run. It is one way of doing it but I wouldn't affirm it is best practice unless you can quote the PHP documentation on it? |
Decided not to include |
IMO app templates should contain .htaccess file configured for this:
So we get out-of-box working routing for Apache HTTPD.
https://github.com/laravel/laravel/blob/master/public/.htaccess
The text was updated successfully, but these errors were encountered: