.htaccess - 我总是观察到这个错误 "invalid rewrite base" ,我的程序不工作
问题描述
我总是看到这个错误:(2019-02-07 12:31:48.595 [ERROR] [/home/shopph/domains/example.com/public_html/.htaccess:4] Invalid rewrite base: ' http://example. com/ ')
我在 .htaccess 中的代码如下:
Options All -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase http://example.com/
RewriteRule ^index\.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
#RewriteRule . index.php [L]
</IfModule>
上述错误阻止运行我的程序。如果您能帮助我解决我的问题,我将不胜感激。此致
解决方案
根据我对您的情况的了解,您必须改变:
RewriteBase http://example.com/
至
RewriteBase /
如果它不起作用,您必须提供有关您的目标的更多详细信息。
推荐阅读
- c# - Unity 游戏在 iOS 上崩溃,但在 Android 上没有
- python-3.x - 在客户端 PC 上写入文件并运行它
- android - 有没有办法单击按钮/图像按钮并创建一个下拉文本视图,将其他按钮推离屏幕?
- excel - Cannot apply a VBA Autofilter to a table which I export to a CSV
- influxdb - 如何在电报中设置测量、字段/标签键和值?
- python - 如何在 for 循环和 if 语句中简化 for 循环?
- python - 为什么这个简单的递归树遍历算法会失败?
- javascript - TypeError:地图不是函数
- c# - Class Object, Incorporating a separate class as a field
- javascript - 如何使用计时器更改 div 内部