1
嗨我得到了一个惊人的(?)工作来解决网站上的错误。这是一个HTTP 500错误。 它是由htaccess文件引起的。但我无法弄清楚代码有什么问题。这里是代码。以下htaccess规则有什么问题
# Use PHP5 Single php.ini as default
#AddHandler application/x-httpd-php5s .php
# The rules below basically say that if the file exists in the tree, just
# serve it; otherwise, go to index.php. This is more future-proof for your
# site, because if you start adding more and more content types, you don't
# need to alter the .htaccess to accomodate them.
# This is an important concept for the Front Controller Pattern which the
# ZF MVC makes use of.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ public/index.php [NC,L]
Redirect 301 /platforms/mt4-ecn http://example.com/
Redirect 301 /partnerships/mt4-to-mt4-bridge http://example.com/
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/aaaecn/public_html
</IfModule>
<Files php.ini>
order allow,deny
deny from all
</Files>
这个重定向规则适用于zend框架,但我没有任何使用该框架的经验。
我评论了所有的行,现在试着500错误是固定的。所以我通过取消注释将其过滤掉。 。
重写规则^ * $ - [NC,L]
此行引起错误,但删除此给予无效的重定向和404错误。我能做些什么来解决这个问题。
仍然得到一个500错误 – Vignesh
检查你的Apache error.log中,并在这里贴上完整的错误文本。 – anubhava
我的不好,问题甚至没有在这个代码里面。他们故意将该站点重定向到公共文件夹htaccess文件中的另一个站点。刚才注意到了。我删除了,这个网站的工作..我仍然不明白为什么这样的一个混乱发生在这里..无论如何感谢您的帮助.. – Vignesh