.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命令写法中的自己定义错误页面 ...
随机推荐
- MyString(重写String)
http://wenku.baidu.com/view/d7ac113243323968011c925b.html 已知类String的原型为: class String { public: ...
- Codeforces Round #324 (Div. 2) C (二分)
题目链接:http://codeforces.com/contest/734/problem/C 题意: 玩一个游戏,一开始升一级需要t秒时间,现在有a, b两种魔法,两种魔法分别有m1, m2种效果 ...
- java 学习笔记——网络(Socket)
阅读方法:将网页放大到200%. 如果你用过用过word应该知道按住ctrl键使用鼠标滚轮缩放.
- AngularJS 简介、指令、表达式
AngularJS 是一个 JavaScript 框架.它可通过 <script> 标签添加到 HTML 页面. AngularJS 通过指令扩展了 HTML,且通过表达式绑定数据到 HT ...
- 安装less
1.下载安装iterm(http://www.iterm2.com/) 2.打开iterm,输入 sudo npm install -g less
- web项目没有run on server时..
文章转载至:http://blog.csdn.net/hongchangfirst/article/details/7722703 web项目没有run on server 1.首先确保正确安装Tom ...
- grep -i 不区分大小写
# rpm -qa|grep -i "mysql" MySQL-server--.rhel5.x86_64 MySQL-test--.rhel5.x86_64 MySQL-embe ...
- Spring学习笔记—Spring之旅
1.Spring简介 Spring是一个开源框架,最早由Rod Johnson创建,并在<Expert One-on-One:J2EE Design and Development> ...
- Python 小游戏 Bunny
最近在学习Python,所以上网找了一个小程序练练手. 关于这款名为[Bunny]的小游戏,详细请看下面的链接: http://www.oschina.net/translate/beginning- ...
- Delphi基础语法的学习笔记和注意事项总结
以下是我在自学Delphi的时候,对一些注意点的简单总结,并没有什么系统性可言,只是一个学习时顺手记下的笔记,主要为了当时加深对知识的印象,并没有希望能在以后的复习和使用Delphi中有什么多大的参考 ...