.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命令写法中的自己定义错误页面 ...
随机推荐
- ios中通过调试来使用私有api
转自:http://blog.csdn.net/cubepeng/article/details/11284173 OS不允许使用ios私有api,使用私有api可以获得意想不到的效果 ,同时使用私有 ...
- Android 录音
想要实现wav格式的编码时我们也就不能再使用MediaRecorder,而只能使用AudioRecord进行处理
- Django搭建简易博客
Django简易博客,主要实现了以下功能 连接数据库 创建超级用户与后台管理 利用django-admin-bootstrap美化界面 template,view与动态URL 多说评论功能 Markd ...
- Delphi基础语法的学习笔记和注意事项总结
以下是我在自学Delphi的时候,对一些注意点的简单总结,并没有什么系统性可言,只是一个学习时顺手记下的笔记,主要为了当时加深对知识的印象,并没有希望能在以后的复习和使用Delphi中有什么多大的参考 ...
- Shell编程基础教程2--变量和运算符
2.变量和运算符 2.1.变量的类型 本地变量:环境变量:变量替换(显示变量):位置变量:标准变量:特殊变量: 2.2.本地变量 本地变量在用户现在的shell生命周期的脚本中使用 在命令行, LOC ...
- 使用.NET Framework的配置文件app.config
在一般的项目中,为了使你的代码更加灵活,更方便调整,减少不必要的hard code,我们都在config中添加许多配置信息,一般可以选择.NET自带的配置文件形式app.config或者web项目中的 ...
- 攻城狮在路上(叁)Linux(十八)--- 文件系统的简单操作
本篇仅作为补漏. 一.查看磁盘和目录的容量:df du df:列出文件系统的整体磁盘使用量. du:评估文件系统的磁盘使用量(常用于评估目录所占容量) 二.连接文件:ln 1.hard link:硬 ...
- 团队作业-第一周-NABCD竞争性需求分析
1. Need 需求 随着科技信息的发展,传统的课堂点名亟待步入信息处理的轨道,移动校园课堂点名软件恰好的切入了这个需求点,市场中词类软件也为数不多,因此需求也是比较强烈. 2. Approac ...
- android selector(转)
Selector的结构描述: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:a ...
- eclipse文本编码格式修改为UTF-8 (转)
如果要使插件开发应用能有更好的国际化支持,能够最大程度的支持中文输出,则最好使 Java文件使用UTF-8编码.然而,Eclipse工作空间(workspace)的缺省字符编码是操作系统缺省的编码,简 ...