【发布时间】:2019-02-26 09:19:55
【问题描述】:
假设我有http://example.com 作为我的网站。
现在,当我执行http://example.com/api/login 时,登录脚本可以正常工作。
但是当我执行http://example.com 时,它直接进入我的路由器设置中的默认开关原因,在 htaccess 文件中为 index.php 显示回显访问被拒绝。 无论哪种情况,它都不会显示网站。
所有文件都在 public_html 文件夹中用于托管。
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php [QSA,L]
那是我当前的 htaccess 文件。我该怎么做才能解决这个问题?
【问题讨论】:
标签: php html apache .htaccess hosting