Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 错误500.htaccess_Php_Apache_.htaccess - Fatal编程技术网

Php 错误500.htaccess

Php 错误500.htaccess,php,apache,.htaccess,Php,Apache,.htaccess,好的!我已经做了一个多小时了,在谷歌上搜索,四处寻找答案。 每当我尝试访问我的页面时,我都会得到以下信息: Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a serv

好的!我已经做了一个多小时了,在谷歌上搜索,四处寻找答案。 每当我尝试访问我的页面时,我都会得到以下信息:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
Apache/2.4.10 (Unix) OpenSSL/1.0.1j PHP/5.6.3 mod_perl/2.0.8-dev Perl/v5.16.3
我已经在htaccess文件中找到了问题所在。 我做错了什么

Htaccess文件

RewriteEngine On
RewriteBase /

RewriteRule ^i([0-9]+)$ view.php?id=$1 [QSA,L]
RewriteRule ^login$ login.php [QSA,L]
RewrireRule ^register$ register.php [QSA,L]

通过打开错误日志,我发现了问题,我错发了上一条重写规则。尽管它现在给了我一个404页。

多亏了@sumurai8,它现在可以工作了


我错发了上一条重写规则

我想这是因为您试图以多个文件为基础,尝试从一个文件(例如index.php)开始,然后从那里添加代码。您有权访问错误日志吗?请打开您的apache错误日志,查看其中写入的内容。乍一看,你的规则似乎没有问题。mod_rewrite是否已启用?@DanFromGermany该指令只能在服务器配置或虚拟主机上下文中出现。它不能位于.htaccess文件中。参见Thank@Sumurai8,通过打开错误日志,我找到了问题所在,我错发了上一条重写规则。编辑:它现在给了我一个404页。