htaccess 选项 +FollowSymLinks 给我 500 内部服务器错误
这个 htaccess 正在工作,然后我打开它然后关闭。当我刷新浏览器时。这是 500 内部服务器错误。我确定我的 mod_rewrite 已打开。
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ index.php?page=$1 [L,QSA]
我在这里做错了什么吗?或有什么建议或意见?
This htaccess was working, then i just open it and then close. when i refresh my browser. it's 500 internal server error. I'm sure that my mod_rewrite is on.
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ index.php?page=$1 [L,QSA]
Did i do something wrong here? or any suggestions or comments?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
确保您拥有AllowOverride Options权限< /a> 使用
选项
。Make sure you have AllowOverride Options privileges to use
Options
.我遇到了同样的问题并通过删除此行来修复它:
I had same problem and fixed it by removing this line:
看来,如果配置了选项指令,那么也需要设置目录指令。
这意味着可以访问 Apache 配置文件。
如果不是这种情况,我们可以简单地注释“Options +FollowSymLinks”行,考虑到该指令默认为“Options All”,如 Apache 文档所述。
It appears that if the options directive was configured then it's necessary to set up the directory directive too.
This implies access to the Apache configuration files.
If this is not the case, we can simply comment the line "Options +FollowSymLinks", considering that this directive is by default "Options All" as states the Apache documentation.
我不认为这是一个好的做法,但在我将AllowOverride规则设置为All之后,它对我有用,不知道为什么,但由于我只需要它来进行本地测试,所以没问题......
I don't think this is good practice, but it worked for me after i made AllowOverride rule to All, not sure why, but since I needed it only for testing locally it was OK...
对我来说,这是受影响网站的指令:
我只需将“FollowSymLinks”添加到列表中,500 错误就消失了。
(花了一个小时尝试诊断问题,这个 StackOverflow 问题给了我足够的线索来解决它。在这里添加我的解决方案,以防它可以帮助其他人。)
For me, this was in the directives for the site that was affected:
I simply added "FollowSymLinks" to the list, and the 500 error went away.
(Spent an hour trying to diagnose the problem, and this StackOverflow question gave me enough clues to solve it. Adding my solution here in case it can help someone else.)
在我的应用程序中有 75 多个应用程序规则,使用“
谢谢&问候,
森德希尔
In my application there were 75+ application rules,using "
Thanks & Regards,
Sendhil
您使用的是 one.com 吗?然后你必须编辑 htaccess
尝试用
+选项FollowSymLinks
Are you using one.com? Then you have to edit htaccess
Try with
+Options FollowSymLinks