在BAE上若想用ThinkPHP的那一套URL路由方式,必须在BAE上rewrite一下,之前我就直接用了不过是403错误,rewrite方式如下:
把你在BAE上的文件checkout到本地,在根目录下的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) script : $1 - url : (.*.css) script : $1 - url : (.*.js) script : $1 - url : (.*.jpg) script : $1 - url : (.*.gif) script : $1 - url : (.*.jpeg) script : $1 - url : (.*.png) script : $1 - url : (.*)?(.*) script : index.php?$2 - url : (.*) script : index.php?$1