有没有办法使Python SimpleHTTPServer支持mod_rewrite?
我正在尝试使用Ember.js,将历史API用作位置API,要使其工作,我必须:
1) add some vhosts config in WAMP (not simple), or
2) run python -m simpleHTTPServer (very simple)
所以当我在浏览器中打开它,localhost:3000
并点击导航(例如about和users)时,它工作得很好。url由Ember.js分别更改为localhost:3000/about
和localhost:3000/users
。
但是当我试图直接在新选项卡中打开localhost:3000/about
时,python web服务器只返回404。
我让.htaccess将所有内容重定向到index.html,但我怀疑python simple web server并没有真正读取htaccess文件(我在这方面做得对吗?)
我试过下载PHP 5.4.12并运行内置的web服务器,url和htaccess mod廑rewrite工作得很好。但是我仍然不愿意从稳定的5.3升级到(可能仍然不够稳定)5.4.12,所以如果有一种方法可以在python简单web服务器中支持mod_rewrite,那就更好了。
谢谢你的回答。
目前没有回答
相关问题 更多 >
编程相关推荐