douzi3756 2017-06-26 03:38 采纳率: 100%
浏览 21
已采纳

在服务器中使用htaccess时出错500错误

i have project in localhost , i apply the rewrite simple rule , it's work fine in localhost .when i upload in cpanel .Rewrite url (htaccess) work only for one page but not for others . means its give me 500 internal error. i convert Profile.php to domain.com/profile and about-us.php to domain.com/about-us but it give me 500 error

# Turn Rewrite Engine On                                        
RewriteEngine on                                                  
RewriteRule ^profile$ Profile.php [NC,L]                          
RewriteRule ^profile-setting$ User-Profile.php [NC,L]             
RewriteRule ^checkout$ checkout.php [NC,L]                        
RewriteRule ^summer-store$ product.php [NC,L]

only last product.php page work in both localhost and cpanel , but other only work on localhost not in cpanel(500 error) .Where is the Problem Exist.Many Thanks in Advance

  • 写回答

1条回答 默认 最新

  • duankuang1046 2017-06-27 02:35
    关注

    If you have root access of the server where the website is hosted , just login to the server with root user and check the logs at path /usr/local/apache/logs/error_log while browsing the pages that have issues. The error log will show you whats happening and then you can apply the fixes accordingly.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 机器学习简单问题解决
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写