tp的url rewrite

浏览:1947 发布日期:2012/12/11
3.1.2 - 普通 - 未处理
我是在百度bae中使用thinkphp的,用的是bae中提供的例子:http://developer.baidu.com/wiki/index.php?title=%E5%B8%AE%E5%8A%A9%E6%96%87%E6%A1%A3%E9%A6%96%E9%A1%B5/%E4%BA%91%E7%8E%AF%E5%A2%83/PHP%E6%A1%86%E6%9E%B6%E6%94%AF%E6%8C%81
但是把URL_MODEL改成2(即url rewrite模式)后,发现资源文件像js、css、jpg这些都无法访问了,提示404,URL_MODEL改成其他的数字则每个链接都跳到主页去了。求解决,多谢
app.conf如下:
handlers:
- expire : .jpg modify 10 years
- expire : .swf modify 10 years
- expire : .png modify 10 years
- expire : .gif modify 10 years
- expire : .JPG modify 10 years
- expire : .ico modify 10 years
- url : (.*\.(html|css|htm|js|img))
script : $1
- url : (.*)\?(.*)
script : index.php?$2
- url : (.*)
script : index.php
例子:
http://[我的服务根路径]/Public/css/ht_global.css——404
ht_global.css放在根目录下的Public/css文件夹中
评论(
后面还有条评论,点击查看>>