.htaccess 的写法
RewriteCond
RewriteRule
记录下现在我会的:
RewriteEngine On
#RewriteRule ^(.*)/(.*)/$ index.php?m=index&c=$1&a=$2 [QSA]
#RewriteRule ^(.*)/$ index.php?m=index&c=$1&a=index [QSA] # yhy:测试test
RewriteRule ^test$ index.php?c=test [QSA]
RewriteRule ^test/(.*)/$ index.php?c=test&a=$1 [QSA]
RewriteRule ^test/(.*)/(.*)\.html$ index.php?c=test&a=$1&id=$2 [QSA] # yhy:finance
RewriteRule ^Finance/$ index.php?c=finance [QSA]
RewriteRule ^Finance/type-(\d+)\.html$ index.php?c=finance&a=type&leixing=$1 [QSA]
RewriteRule ^Finance/(.*)\.html$ index.php?c=finance&a=detail&id=$1 [QSA]
# RewriteRule ^Finance/type-(\d+)/&page=(\d*)$ index.php?c=finance&a=index&leixing=$1&page=$2 [QSA] url:
if (!-e $request_filename) {
rewrite ^/login/$ /index.php?c=login last;
rewrite ^/loginout/$ /index.php?c=loginout last;
rewrite ^/regist/$ /index.php?c=regist last;
rewrite ^/regist/(.*)/$ /index.php?c=regist&a=$1 last;
rewrite ^/help/$ /index.php?c=help last;
rewrite ^/finance/$ /index.php?c=finance last;
rewrite ^/finance/login/(.*)\.html$ /index.php?c=center&a=login&id=$1 last;
rewrite ^/finance/(.*)\.html$ /index.php?c=finance&a=info&id=$1 last;
rewrite ^/safe/$ /index.php?c=safe last;
rewrite ^/risk/$ /index.php?c=risk last;
rewrite ^/lcc/$ /index.php?c=lcc last; rewrite ^/question/$ /index.php?c=question last;
rewrite ^/guide/$ /index.php?c=guide last;
rewrite ^/findpwd/$ /index.php?c=findpwd last;
rewrite ^/findpwd/(.*)/$ /index.php?c=findpwd&a=$1 last;
rewrite ^/center/$ /index.php?c=center last;
#关于我们
rewrite ^/about/$ /index.php?c=about last;
rewrite ^/about/(.*)/$ /index.php?c=about&a=$1 last;
rewrite ^/about/(.*)/(.*)\.html$ /index.php?c=about&a=$1&id=$2 last;
#处理一键绑定
rewrite ^/bangding/$ /index.php?c=binding last;
rewrite ^/checkcustkey/$ /index.php?c=binding&a=checkcustkey last;
#常见问题
rewrite ^/faq/$ /index.php?c=faq last;
rewrite ^/faq/(.*)/$ /index.php?c=faq&a=$1 last;
rewrite ^/faq/(.*)\.html$ /index.php?c=faq&id=$1 last;
#P2P活动
rewrite ^/p2pactive/$ /index.php?c=p2pactive last;
rewrite ^/p2pactive/page_(\d+)\.html$ /index.php?c=p2pactive&page=$1 last;
rewrite ^/p2pactive/(.*)\.html$ /index.php?c=p2pactive&a=info&id=$1 last;
#搜索c
rewrite ^/type-(\d+)-(\d+)-(\d+)/$ /index.php?c=finance&a=index&tuijian=$1&shouyi=$2&qixian=$3 last;
#短信
rewrite ^/msg/$ /index.php?c=msg last;
#保单
rewrite ^/insurance/$ /index.php?c=insurance last;
}
.htaccess 的写法的更多相关文章
- apache域名重定向301跳转 .htaccess的写法
RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^baidu.com$ [NC] RewriteRule ^(.*)$ http://w ...
- 服务器.htaccess 详解以及 .htaccess 参数说明(转载)
htaccess文件(或者”分布式配置文件”)提供了针对目录改变配置的方法, 即,在一个特定的文档目录中放置一个包含一个或多个指令的文件, 以作用于此目录及其所有子目录.作为用户,所能使用的命令受到限 ...
- .htaccess详解及.htaccess参数说明【转】
目录(?)[-] htaccess 详解 htaccess rewrite 规则详细说明 RewriteEngine OnOff RewriteBase URL-path RewriteCond Te ...
- PHP如何让apache支持.htaccess 解决Internal Server Error The server …错误
TP框架 打开 www.newtp.com/index.php/Home/Index/abc出现 如下错误: Internal Server Error The server encountered ...
- 【转】.htaccess详解及.htaccess参数说明
.htaccess文件(或者”分布式配置文件”)提供了针对目录改变配置的方法, 即,在一个特定的文档目录中放置一个包含一个或多个指令的文件, 以作用于此目录及其所有子目录.作为用户,所能使用的命令受到 ...
- .htaccess详解及.htaccess参数说明
.htaccess文件(或者”分布式配置文件”)提供了针对目录改变配置的方法, 即,在一个特定的文档目录中放置一个包含一个或多个指令的文件, 以作用于此目录及其所有子目录.作为用户,所能使用的命令受到 ...
- 【转】服务器.htaccess 详解以及 .htaccess 参数说明
htaccess文件(或者”分布式配置文件”)提供了针对目录改变配置的方法, 即,在一个特定的文档目录中放置一个包含一个或多个指令的文件, 以作用于此目录及其所有子目录.作为用户,所能使用的命令受到限 ...
- server.htaccess 具体解释以及 .htaccess 參数说明
.htaccess文件(或者"分布式配置文件")提供了针对文件夹改变配置的方法. 即.在一个特定的文档文件夹中放置一个包括一个或多个指令的文件, 以作用于此文件夹及其所有子文件夹. ...
- Apacheserver自己定义404页面的两种方法以及.htaccess的重要命令总结
Apacheserver自己定义404错误页面有两种方法: 第一种方法最简单,直接在Apache的httpd.conf下进行配置改动命令,改动的内容请參看.htaccess命令写法中的自己定义错误页面 ...
随机推荐
- 大数运算(python2)
偶然又遇到了一道大数题,据说python大数运算好屌,试了一发,果然方便-1 a = int( raw_input() ); //注意这里是按行读入的,即每行只读一个数 b = int( raw_in ...
- iOS自动更新如何实现
APP检测更新可以使用两种方法.第一种是和安卓等系统一样,获取自己服务器的APP版本号与已安装的APP版本号比较:第二种是根据已发布到app store上的应用版本号与已安装的APP版本号比较更新.第 ...
- loadrunner支持https协议的操作方法-经验总结
问题:用户portal支持https协议,用loadrunner录制登陆脚本时发现未录制到用户名和密码 录制到的脚本如下: login() { lr_think_time(10); web_url(& ...
- max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
sh- /etc/sysctl.conf vm.max_map_count = #在/etc/sysctl.conf追加上面一条 #并执行命令: sysctl -p
- Vs 控件错位 右侧资源管理器文件夹点击也不管用,显示异常
问题:显卡驱动异常. 缘由:驱动精灵万能显卡安装系统 解决方案:根据笔记本型号去官网下载适配显卡驱动.
- 排队打饭 sdut 2443【最简单的贪心法应用举例】
排队打饭 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 题目链接:http://acm.sdut.edu.cn/sdutoj/p ...
- 常用的Java代码汇总
1. 字符串有整型的相互转换 Java 1 2 <strong>Stringa=String.valueOf(2); //integer to numeric ...
- Oracle 数组赋值
只需要像下面这样就OK了 begin -- Call the procedure in_var(1):=null;in_var(1):='a123123'; pack_abc.pro_abc(in_v ...
- C# 实现单实例程序
在我们经常使用的软件中,当我们已经打开后,再次打开时,有的软件不会出现两个.例如有道词典,会将上次的界面显示出来,或者提示我们“该程序已经运行...”.我通过一个简单的C# WPF例子来说明. 首先我 ...
- .NET中的六个重要概念:栈、堆、值类型、引用类型、装箱和拆箱
为何要翻译 一来是为了感受国外优秀技术社区知名博主的高质量文章,二来是为了复习对.NET技术的基础拾遗达到温故知新的效果,最后也是为了锻炼一下自己的英文读写能力.因为是首次翻译英文文章(哎,原谅我这个 ...