dsogx84602 2016-03-23 02:59 采纳率: 0%
浏览 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条)

报告相同问题?