LiteSpeed 一大优势当然是支持 Apache .htaccess 重写,相当给力。
如果你还没有安装,那么可以看上一篇中的安装配置教程。
默认安装后是没有开启rewrite功能的,开启的方法是这样
进入后台管理页面 Configuration ->Server
在HT Access 这一栏中点 Edit 勾选FileInfo 这个选项 点Save 然后重启就OK了。
- When Limit is checked, directives “Order”, “Allow from” and “Deny from” are allowed.
当 Limit选项被选中,”Order”, “Allow from” and “Deny from” 这些指令将被允许使用。 - When Auth is checked, directives “AuthGroupFile”, “AuthName”, “AuthType”, “AuthUserFile”, “Require” are allowed.
当 Auth 选项被选中 ,”AuthGroupFile”, “AuthName”, “AuthType”, “AuthUserFile”, “Require” 这些指令将被允许使用。主要用于做身份验证。 - When FileInfo is checked, directives “Satisfy”, AddDefaultCharset”, “AddType”, “DefaultType”, “ForceType”, “ExpiresActive”, “ExpiresDefault”, “ExpiresByType”, “Redirect”, “RedirectTemp”, “RedirectPermanent”, “RewriteEngine”, “RewriteOptions”, “RewriteBase”, “RewriteCond” and “RewriteRule” are allowed
当 FileInfo 选项被选中,^^^^ 允许重写命令 - When Indexes is checked, directive “DirectoryIndex” is allowed
- When Options is checked, directive “Options” is allowed
原创文章,转载请注明: 转载自贝壳博客