nginx、htaccess 上的韭菜
你好,我正在尝试在 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} !-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>
Hello there im trying to setup chive on nginx, can someone help me convert htaccess for it ?
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您将chive安装在子目录“chive”中,请执行以下操作:
没有子目录:
您可以使用$query_string代替$args,根据http ://wiki.nginx.org/HttpCoreModule(内容为:“与 $args 相同,只是该变量是只读的。”)
In case you installed chive in a subdirectory "chive" do the following:
without a subdir:
instead of $args you could use $query_string, according to http://wiki.nginx.org/HttpCoreModule (It reads: "The same as $args except that this variable is readonly.")
从那时起伟大的项目就出现了
https://github.com/perusio/chive-nginx
Great project appeared since then
https://github.com/perusio/chive-nginx