.htaccess的错误配置错误500

问题描述:

我在http://www.ssdpsjal.tk 我的代码实现了一个新的.htaccess文件是 -.htaccess的错误配置错误500

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

我用笨。您可以访问该网站查看错误。

而且我已经尽了本地服务器上此.htacccess并没有显示有任何这样的错误(我认为)

我的文档结构如下

--- ssdpsjal.tk    //given by host. Non-writable 
    --n       //the folder where website is stored 
    --web_based_editor   //something my website uses 
    --.htaccess file    //Htaccess file that I told about 
    --Some other stuff not relevent to the question 

编辑

我已经多次更改了代码,并且在发生一些更改之后,我发现错误发生在RewriteRule ^(.*)$ n/index.php/$1 [L]

注意

indexRewriteRule ^$ /index [L]没有的index.php它实际上是我笨控制器的功能(方法)

没有的.htaccess实际的URL是http://www.ssdpsjal.tk/n/index.php/s/index

注意index上最后一句话,就是那一个!

+0

你的'error.log'说什么? – MrDarkLynx

+0

我看不到主机服务提供商不允许我执行的错误日志。 (我是一个免费的用户:() – Webmaster

+0

'RewriteRule ^(。*)$ n/index.php/$ 1 [L]'为什么这个n /?你只是想绕过显示'index.php'? –

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase/

    RewriteRule ^administrator /sadmin1 [R=301,L] 

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

或者只是改变这一行:

RewriteRule ^(.*)$ n/index.php/$1 [L] 

到:

RewriteRule ^$ n/index.php [L] 
+0

请帮助,我已更新的问题! – Webmaster

+0

编辑我的答案 –

+0

现在我越来越404未找到错误 – Webmaster

我不知道您的配置,但你肯定mod_rewrite的存在?

也许:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule (.*) http://www.ssdpsjal.tk/$1 [R=301,L] 
RewriteRule ^$ n/index.php [L] 
Redirect /administrator /sadmin1 
</IfModule> 
+0

请参阅我刚插入的注释!任何帮助赞赏! – Webmaster

+0

是的,我相信mod_rewrite存在。 – Webmaster

+0

我猜上述没有工作呢? –

找到了答案,以我自己的问题。

.htaccess文件是完全正确的。问题出在网络主机上。他们在没有任何警告的情况下更新他们的服务(通知在5-6小时后发布),因为许多服务都被关闭了。

嗯,我把我的虚拟主机改成了一个更好的新主机。 (000WebHost