Php 500内部服务器错误。htaccess codeigniter

Php 500内部服务器错误。htaccess codeigniter,php,.htaccess,codeigniter,rewrite,Php,.htaccess,Codeigniter,Rewrite,ı有一个使用codeigniter的网站,它工作得很好,但ı需要格式化pc。ı安装了64位windows 7 然后 ı将我的项目粘贴回www目录,现在ı收到此错误。ı不要更改任何代码或其他内容。ı刚刚格式化了我的电脑。htaccess正在工作ı没有更改它 ı我在本地主机上工作,ı不改变任何想法,ı不知道为什么会发生。请帮我解决这个问题 完全错误: The server encountered an internal error or misconfiguration and was unable

ı有一个使用codeigniter的网站,它工作得很好,但ı需要格式化pc。ı安装了64位windows 7

然后

ı将我的项目粘贴回www目录,现在ı收到此错误。ı不要更改任何代码或其他内容。ı刚刚格式化了我的电脑。htaccess正在工作ı没有更改它

ı我在本地主机上工作,ı不改变任何想法,ı不知道为什么会发生。请帮我解决这个问题

完全错误:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
我的.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blogna/index.php/$1 [L]

使用此项检查mod rewrite是否正常工作。如果它不工作,您将得到404页,而不是内部服务器错误500

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blogna/index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$/blogna/index.php/$1[L]
ErrorDocument 404/index.php
IfModule检查模块是否可用。你可以在这里找到mod rewrite和codeigniter上的wiki条目


如果您看到404错误,则需要启用mod rewrite。如果仍然看到500错误,则其他错误。

使用此选项检查mod rewrite是否正常工作。如果它不工作,您将得到404页,而不是内部服务器错误500

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blogna/index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$/blogna/index.php/$1[L]
ErrorDocument 404/index.php
IfModule检查模块是否可用。你可以在这里找到mod rewrite和codeigniter上的wiki条目


如果您看到404错误,则需要启用mod rewrite。如果您仍然看到500错误,则可能是其他错误。

ı找到了解决方案,谢谢大家

如果要使用htaccess,必须在wampserver上启用它


servivec部分。

找到了解决方案,谢谢大家

DirectoryIndex index.php

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] 
如果要使用htaccess,必须在wampserver上启用它


服务部分。

1。检查windows防火墙2。删除并读取C.I.check apache日志以了解更多详细信息。错误日志将包含错误的确切详细信息。您在浏览器中看到的内容故意含糊不清,以防止内部配置详细信息泄露。1。检查windows防火墙2。删除并读取C.I.check apache日志以了解更多详细信息。错误日志将包含错误的确切详细信息。您在浏览器中看到的内容故意含糊不清,以防止内部配置详细信息泄露。我尝试了许多类似的方法,但这是唯一对我有效的方法。。。。非常感谢。你能解释一下@Ruwantha是什么意思吗?它会检查mod_rewrite模块是否被apache加载和使用。如果apache没有启用mod_rewrite,则显示error404,然后显示IfModule mod_rewrite.c的位置,它应该可以工作。。。不是吗?因为如果我的梦想成真。。。但是当它不在那里时,它就不起作用了。我尝试了很多类似的方法,但这是唯一对我有效的方法。。。。非常感谢。你能解释一下@Ruwantha是什么意思吗?它会检查mod_rewrite模块是否被apache加载和使用。如果apache没有启用mod_rewrite,则显示error404,然后显示IfModule mod_rewrite.c的位置,它应该可以工作。。。不是吗?因为如果我的梦想成真。。。但当它不在那里时,它就不起作用了
DirectoryIndex index.php

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]