数码资讯
Apache的PHP伪静态重写设置
1。Apache的配置: 1。支持httpd.conf配置 2。Support the directory.Htaccess configuration (a distributed configuration file for virtual space, the space dealer is
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
1。Apache的配置:
1。支持httpd.conf配置
2。Support the directory.Htaccess configuration (a distributed configuration file for virtual space, the space dealer is not allowed to modify the Apache configuration file)
使重写(httpd. conf)
(有时选择指标followsymlinks会有问题,只是配置选项)
LoadModule rewrite_module模块/ mod_rewrite.so
使.htaccess
创建一个修改:创建所有
二,mod_rewrite规则:
例如:
RewriteEngine on ->重写引擎启动
关键词^ /测试({ }×0-9)。HTML $ /测试。phpid = 1美元->测试访问加上任何领域。HTML可以跳到test.php场,1美元,规则存储在虚拟内存
三、mod_rewrite规则修改
1)R强制外部重定向
2)F禁用URL返回的状态代码403http。
3)G力的URL将消失,并返回410http状态代码。
4)P强制使用代理转发。
5)L表示当前规则是停止分析后重写规则的最后一条规则。
6)n从第一条规则开始运行重写过程。
7)C与下一条规则相关联。
如果规则匹配正常处理,下列修饰符无效
8)T = MIME类型(强制MIME类型)强制MIME类型
9)NS仅用于非内部subrequests
10)NC不区分大小写。
11)QSA追加请求字符串
12)NE不等于输出转移的特殊值为1美元1美元。
例如:
关键词^ /新({ }×0-9)/新。phpid = $ 1 / $ {红}
简单小例子:
RewriteEngine on
关键词^ /(.html $ /指标。PHP。)
1。支持httpd.conf配置
2。Support the directory.Htaccess configuration (a distributed configuration file for virtual space, the space dealer is not allowed to modify the Apache configuration file)
使重写(httpd. conf)
(有时选择指标followsymlinks会有问题,只是配置选项)
LoadModule rewrite_module模块/ mod_rewrite.so
使.htaccess
创建一个修改:创建所有
二,mod_rewrite规则:
例如:
RewriteEngine on ->重写引擎启动
关键词^ /测试({ }×0-9)。HTML $ /测试。phpid = 1美元->测试访问加上任何领域。HTML可以跳到test.php场,1美元,规则存储在虚拟内存
三、mod_rewrite规则修改
1)R强制外部重定向
2)F禁用URL返回的状态代码403http。
3)G力的URL将消失,并返回410http状态代码。
4)P强制使用代理转发。
5)L表示当前规则是停止分析后重写规则的最后一条规则。
6)n从第一条规则开始运行重写过程。
7)C与下一条规则相关联。
如果规则匹配正常处理,下列修饰符无效
8)T = MIME类型(强制MIME类型)强制MIME类型
9)NS仅用于非内部subrequests
10)NC不区分大小写。
11)QSA追加请求字符串
12)NE不等于输出转移的特殊值为1美元1美元。
例如:
关键词^ /新({ }×0-9)/新。phpid = $ 1 / $ {红}
简单小例子:
RewriteEngine on
关键词^ /(.html $ /指标。PHP。)
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。