<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
本文介绍了一种通过mod_rewrite模块实现的URL重写规则配置方法。当请求的文件既不是目录也不存在时,所有请求将被重定向到index.php并附加原始路径作为参数。这种方法常用于将不带.php扩展名的URL映射到特定脚本。
6055

被折叠的 条评论
为什么被折叠?



