站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
Gallery:URL重写(URL Rewrite)
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
=== 完整的规范=== 以下列出了全部被支持的设定: * '''pattern'''值:''string'' (optional)<br/>The default rule pattern. The pattern is used to generate short URLs and is used to match requests, to determine to which rule a request corresponds. Rules which do not define a pattern can not be used to generate short URLs. Rules which do not define a pattern match all requests. The pattern can contain upper and lower case alpha numeric characters, forward slash (/), period (.), and dash (-). The percent sign (%) is used in the pattern to delineate keywords. The pattern is a literal string. Regular expression meta characters are escaped where the pattern appears in the context of a regular expression. * '''keywords'''值:''array(array(setting => value, ...), ...)'' (optional)<br/>Defines how a keyword should be parsed and generated. All keywords needs to be replaced with something. Keyword settings: ** '''pattern'''值:''string''<br/>A regular expression that will catch the expected value. ** '''help'''值:''translated string''<br/>Describes what kind of value this replaced with when generating the rule. ** '''ignore'''值:''integer''<br/>Ignores back reference, if this is set. ** '''function'''值:''array(module, class, function)''<br/>A function that replaces the keyword with a value (see the [[Gallery:URL_Rewrite#Keyword_Function|Keyword Function]] reference on how it works). If no function is specified the URL generator will replace the keyword with the query string param. * '''comment'''值:''translated string'' (optional)<br/>A short description of what kind of rule this is. * '''match'''值:''array(param => value, ...)'' (optional)<br/>Gallery URLs whose parameters are a superset of match are replaced with the short URL this rule defines. Requests which match this rule are redirected to the value of match. * '''queryString'''值:''array(param => value, ...)'' (optional)<br/>Appends the given value pairs to the query string (static values). Although very similar to 'match', 'queryString' is not involved in generating short-URLs. These params are just added to the target URL. * '''onLoad'''值:''array(module, class, function)'' (optional)<br/>A function which will be called after the the initialization of the URL generator. Only called for rules with a ''match'' value set and when that view is loaded. See the [[Gallery:URL_Rewrite#onLoad_Function|onLoad Function]] reference below on how it works. * '''options'''值:''array(param => value, ...)'' (optional)<br/> ** Same as the GalleryUrlGenerator::generateUrl options parameter. E.g. ''array('forceServerRelative' => true, 'forceDirect' => true)''. ** Used to generate the target URL of the rewrite. ** Only available for preGallery parsers (mod_rewrite and isapi_rewrite). ** Defaults to: ''array('forceDirect' => false, 'forceServerRelativeUrl' => true, 'forceSessionId' => false, 'htmlEntities' => false, 'urlEncode' => false, 'useAuthToken' => false)'' * '''help'''值:''translated string'' (optional)<br/>A longer description of the rule. * '''locked'''值:''integer'' (optional)<br/>If locked is set users may not change the default pattern. * '''flags'''值:''array(flag, ...)'' (optional)<br/>Flags are only supported by preGallery parsers (see the parser setting). Valid flags are F (forbidden) and R (explicit redirect). * '''restrict'''值:''array(param => value, ...)'' (optional)<br/>Makes the rule only affect a query string that has param=value set. Restrict is only supported by preGallery parsers (see the parser setting). * '''exemptReferer'''值:''integer'' (optional)<br/>If exemptReferer is set then requests made by a referer in the access list is exempted from this rule. Only affective in combination with the restrict setting. * '''parser'''值:''string'' (optional)<br/>The type of parser required for this rule. Can be either preGallery (parses the rule before Gallery is loaded), inGallery (Gallery parses the rule itself) or empty/null (when both methods are supported). * '''conditions'''值:''array(array(setting => value, ...), ...)'' (optional)<br/>Custom conditions which requests must satisfy to match this rule. Conditions are only supported by preGallery parsers (see the parser setting). Condition settings: ** '''test'''值:''string''<br/>The subject to which the pattern is applied. For examples of conditions' test strings, see http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond. ** '''pattern'''值:''string''<br/>A regular expression which is applied to to the test string. Conditions' pattern may contain keywords. eg. $rule['conditions'] = array( array('test' => 'REQUEST_METHOD', 'pattern' => 'OPTIONS'), array('test' => 'HTTP:Authorization', 'pattern' => '%authorization%')); ** '''flags'''值:''array(flag, ...)'' (optional)<br/>You can also set special flags for conditions. For examples of conditions' flags, see http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond. Rules which do not define a pattern or restrict or conditions will invariably match all requests and redirect to the value of match.
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)