I have moved my simple application built on top of basic template to production server. Problem is my URLs do not work anymore. If I turn off enablePrettyUrl everything works fine but URL is messy. When I turn it on I get error:
404 Not Found
nginx
I have .htaccess in my web root directory and mod_rewrite and overrides are enabled on server.
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
Thanks for your reply. But I do not understand how to do Nginx configuration. Can I make some file like .htaccess with the config described like in the guide, or this has to be done on server by hosting provider ?
I’m not familiar with nginx servers but afaik you cannot configure host without reloading the whole server so if you haven’t got the access to server configuration (like on shared hosting) it is not that easy.
I hope that nginx forum users can shed some light on this.
That is yii1. Plus it is still not clear to people that do not know how to do server configs ( like me ), do we achieve this by making some file in our app with that config or we need to bother server admins to do it.