.htaccess nginx上的韭菜,htaccess
你好,我正在尝试在nginx上安装chive,有人能帮我转换htaccess吗.htaccess nginx上的韭菜,htaccess,.htaccess,nginx,.htaccess,Nginx,你好,我正在尝试在nginx上安装chive,有人能帮我转换htaccess吗 Options +FollowSymLinks IndexIgnore */* DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME}
Options +FollowSymLinks
IndexIgnore */*
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php?__chive_rewrite_on=1&%{QUERY_STRING}
RewriteRule ^$ index.php?__chive_rewrite_on=1&%{QUERY_STRING}
</IfModule>
Options+FollowSymLinks
IndexIgnore*/*
DirectoryIndex.php
重新启动发动机
#如果存在目录或文件,请直接使用它
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
#否则将其转发到index.php
重写规则。index.php?\uuuu chive\u rewrite\u on=1&%{QUERY\u STRING}
重写规则^$index.php?\uuuu chive\u rewrite\u on=1&%{QUERY\u STRING}
如果您在子目录“chive”中安装了chive,请执行以下操作:
location /chive/ {
try_files $uri chive/$uri/ /chive/index.php?q=$uri&$args;
}
没有子目录:
location / {
# ... existing options ... check twice!
try_files $uri $uri/ /index.php?q=$uri&$args;
}
您可以使用$query\u字符串代替$args,根据(它的内容是:“与$args相同,只是这个变量是只读的。”)此后出现了伟大的项目