dsogx84602 2016-03-23 02:59
浏览 185
已采纳

PHP - 将所有页面重定向到主页。

I used php opencart for e-commerce website. Works everything fine when configured with apache on AWS server. I wanted to set it up locally and I stared the server using the command

php -S :8001

Home page is loading fine. If i click on any link url is changing but home page is only coming all the time. For example http://localhost:8001/ and http://localhost:8001/entertainment-leisure both are giving same response. What should I do?

  • 写回答

3条回答 默认 最新

  • dongzang5815 2016-03-24 04:10
    关注

    I have figure out whats the issue here. PHP local server cannot access .htaccess file. Hence it cannot rewrite urls. Open cart is using .htaccess to rewrite urls. So for every page it will redirect to home page. I configured with apache in local and it worked fine for me. Point to be noted PHP local server will not have full options without apache.

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

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度