Answer the question
In order to leave comments, you need to log in
How to configure nginx rules?
there is such a config for Apache (more precisely .hataccess)
AddCharset UTF-8 .php
AddDefaultCharset Off
RewriteEngine on
RewriteBase /import/
#If in directory RewriteBase /directory_name/import/
RewriteCond $1 !^(system|application|robots\\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
needs to be converted to nginx
--------
tried using
nginx configuration converter
location /import/ {
if (!-e $request_filename){
rewrite ^/import/(.*)$ /import/index.php?/$1 break;
}
}
didn't work
-------------
----------------------------
via another service
if ($1 !~ "^(system|application|robots\.txt)") {
set $rule_0 1$rule_0;
}
if (!-f $request_filename){
set $rule_0 2$rule_0;
}
if (!-d $request_filename){
set $rule_0 3$rule_0;
}
if ($rule_0 = "321"){
rewrite ^/(.*)$ /index.php?/$1 last;
}
--------------------
When restarting the server, I cursed at zero. I tried to replace the zeros, it's all the same.
where is the mistake ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question