duanrong5927 2012-09-24 11:53
浏览 68
已采纳

使用.htaccess与php5.4内置服务器

In my development environment, I use the web built-in web server of php5.4 but it seems that .htaccess doesn't work correctly. I can't found the doc of that server. Can someone tell me if it is possible to use htaccess and mod_rewrite like apache?

Thank you very much

  • 写回答

2条回答 默认 最新

  • doupu2722 2012-09-24 11:58
    关注

    As in my comment mentioned, the current directory is by default your webroot. Also this webserver doesn't support .htaccess.

    You'll find a good explanation about your issues here.

    Get the Server Running

    By default, the current directory is your webroot and you can now request whatever files are here, and run PHP in the usual way

    or

    Routing Requests Like Apache Rewrite

    One immediate feature that I was looking for was the ability to redirect all incoming requests to index.php, which I usually do with an .htaccess file. This webserver doesn't support those (although my good friend Josh has created something pretty close) but it does support a routing file.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题