Answer the question
In order to leave comments, you need to log in
ReWrite and nginx
Good evening,
On the advice of Habr, I moved to nginx. Everything flies, except for the only nuance - I can’t translate the rewrite rules in .htaccess into the nginx language in any way. Namely, this:
Help, please, with the translation. Thank you.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
Answer the question
In order to leave comments, you need to log in
try it
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
}
rewrite ^/(.*)$ /index.php?$1 last;
only for statics you will need a separate location, well, or check through if
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question