apache主机重写规则与nginx主机重写规则转换
来源:互联网 发布:舒克高清下载软件官方 编辑:程序博客网 时间:2024/05/27 00:24
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
如apache 的.htaccess
<IfModule mod_rewrite.c><IfModule mod_negotiation.c> Options -MultiViews</IfModule>RewriteEngine On# Redirect Trailing Slashes...RewriteRule ^(.*)/$ /$1 [L,R=301]# Handle Front Controller...RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule>
转换成.htaccess_nginx
rewrite ^/(.*)/$ /$1 permanent;if (!-d $request_filename){ set $rule_1 1$rule_1;}if (!-f $request_filename){ set $rule_1 2$rule_1;}if ($rule_1 = "21"){ rewrite ^/ /index.php last;}
nginx需要配置一下虚拟主机,加入目标文件
include /var/www/studyRepos/laravel-5-blog-master/public/.htaccess_nginx;
然后重启
0 0
- apache主机重写规则与nginx主机重写规则转换
- apache重写规则转Nginx
- Apache和Nginx 重写服务器规则
- 在线Apache重写规则转Nginx
- nginx url 重写规则
- nginx 重写规则!
- Nginx重写规则指南
- nginx重写规则
- nginx重写规则
- Apache重写规则整理
- apache重写规则详解
- apache重写规则
- Apache重写规则解析
- Apache重写规则参数
- 西部数码 linux主机 wordpress 重写规则httpd.conf
- 重写与重载规则
- 重写与重载规则
- Nginx的Rewrite重写规则
- 第四周项目3(1)-结点逆置
- JQuery开发之Galleriffic图片插件介绍
- 第四周项目一用星号拼字母
- Spring单例与线程安全小结
- PHP 源码加密 (zendGuard和ionCube)
- apache主机重写规则与nginx主机重写规则转换
- 大数据Hadoop核心架构HDFS+MapReduce+Hbase+Hive内部机理详解
- 自定义浏览器协议,实现web程序调用本地程序
- Swift-iOS常用控件(UIActivityIndicatorView 活动指示器)
- 时间相关API实战1
- 3周项目 顺序表的基本运算
- BackgroundWorker的使用方法
- 第四周项目3单链表的应用(1)
- TextView清空默认自带的padding