主机屋空间使用伪静态(UrlRewrite)
折腾了很久,终于可以实现伪静态(UrlRewrite)。
[ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files # from accessing through HTTP # Rules to ensure that normal content gets through RewriteRule /abc.html /index.php/$1 [L]
在记事本把以上代码复制保存为httpd.ini,上传到网站的根目录。注意不要修改文件类型,保留ANSI类型。本人尝试过另存为UTF-8类型后,规则就失效了。
搓着在浏览器上输入:http://你的域名/abc.html 看到的内容就是index.php。
浙公网安备 33010602011771号