doufan6033 2019-05-02 10:13
浏览 23

如何使用htaccess重写规则修复“服务器找不到请求的页面”错误

Intermittently I get the error 'The server can not find the requested page' when trying to view pages on my website. Generally pressing refresh resolves the issue.

I suspect this is caused by some of the rewrite rules in the htaccess file, but I can't see what is wrong. The contents of the file is below:

Options -Indexes

RewriteEngine on
RewriteBase /
RewriteRule ^sequences$ sequences.php [L]
RewriteRule ^settings$ user-settings.php [L]
RewriteRule ^variables$ user-variables.php [L]
RewriteRule ^help/([^/\.]+)/?$ help/help.php?content=$1 [L]
RewriteRule ^help$ help/help.php [L]
RewriteRule ^help/$ help/help.php [L]
RewriteRule ^register$ register.php [L]
RewriteRule ^login$ login.php [L]
RewriteRule ^terms$ terms.php [L]
RewriteRule ^trigger-webhook/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ trigger-webhook.php?k=$1&s=$2&t=$3 [L]

An example of a page which has returned the error is /help/conditions, but I have also experienced this from other pages. I'll come back with more examples as they happen.

Does anyone know what might be causing this issue? Is the contents of the htaccess file correct?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 个人网站被恶意大量访问,怎么办
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)