首页 > htaccess中RewriteRule . /index.php [L]这一句的解释

htaccess中RewriteRule . /index.php [L]这一句的解释

重写规则的语法:

RewriteRule Pattern Substitution [flags]

我看到的一个解释是这样的:

Pattern是一个作用于当前URL的兼容perl的正则表达式
重写规则中的Substitution是,当原始URL与Pattern相匹配时,用以替代(或替换)的字符串

这样的话,

RewriteRule . /index.php [L]

这一句难道不是用index.php替换“.”?
“.”代表什么呢?
可是这一句明明是为了隐藏url中的index.php,是为了用空来替代index.php啊?为什么感觉好像是反了呢?


意思是说访问 . 相当于访问 index.php,不是说把地址栏上的 . 替换成 index.php

【热门文章】
【热门文章】