嗨,我有一个很棒的(?)致力于修复网站上的错误。这是HTTP 500错误。它是由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错误是固定的。所以我把它过滤了下来,不加评论。
RewriteRule ^.*$ - NC,L
这一行导致了错误,但是删除了这个无效的重定向和404错误。我能做些什么来解决这个问题。
发布于 2015-07-22 06:48:04
试试你的规则吧:
RewriteEngine On
RewriteRule ^(partnerships/mt4-to-mt4-bridge|platforms/mt4-ecn)/?$ / [L,NC,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ public/index.php [L]https://stackoverflow.com/questions/31555635
复制相似问题