2017-06-24 49 views
0

以前は、自分のサイトの.htaccessファイルを編集しました。後で、私は一時的なERROR 500の問題を経験し始めました。私のサイトを1分Googleからフェッチすることができます。次の分はエラー500です。内部サーバーエラー500

私はgodaddyをチェックして、問題は私の.htaccessファイルから来る可能性が高いと言います。問題は私の.htaccessファイルに何が間違っているのか分かりません。 私は助けが必要です。以下は私の.htaccessファイルです。

RewriteEngine on 
RewriteCond %{HTTP_USER_AGENT} ^Ninjabot [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^SemrushBot [NC] 
RewriteRule ^.*$ - [F] 

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

# END WordPress 

<IfModule mod_expires.c> 
# Enable expirations 
ExpiresActive On 
# Default directive 
ExpiresDefault "access plus 1 month" 
# My favicon 
ExpiresByType image/x-icon "access plus 1 month" 
# Images 
ExpiresByType image/gif "access plus 1 month" 
ExpiresByType image/png "access plus 1 month" 
ExpiresByType image/jpg "access plus 1 month" 
ExpiresByType image/jpeg "access plus 1 month" 
# CSS 
ExpiresByType text/css "access plus 1 month" 
# Javascript 
ExpiresByType application/javascript "access plus 1 year" 
</IfModule> 



<IfModule mod_deflate.c> 
    # Compress HTML, CSS, JavaScript, Text, XML and fonts 
    AddOutputFilterByType DEFLATE application/javascript 
    AddOutputFilterByType DEFLATE application/rss+xml 
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject 
    AddOutputFilterByType DEFLATE application/x-font 
    AddOutputFilterByType DEFLATE application/x-font-opentype 
    AddOutputFilterByType DEFLATE application/x-font-otf 
    AddOutputFilterByType DEFLATE application/x-font-truetype 
    AddOutputFilterByType DEFLATE application/x-font-ttf 
    AddOutputFilterByType DEFLATE application/x-javascript 
    AddOutputFilterByType DEFLATE application/xhtml+xml 
    AddOutputFilterByType DEFLATE application/xml 
    AddOutputFilterByType DEFLATE font/opentype 
    AddOutputFilterByType DEFLATE font/otf 
    AddOutputFilterByType DEFLATE font/ttf 
    AddOutputFilterByType DEFLATE image/svg+xml 
    AddOutputFilterByType DEFLATE image/x-icon 
    AddOutputFilterByType DEFLATE text/css 
    AddOutputFilterByType DEFLATE text/html 
    AddOutputFilterByType DEFLATE text/javascript 
    AddOutputFilterByType DEFLATE text/plain 
    AddOutputFilterByType DEFLATE text/xml 
    # In the next 4 lines, I'm trying to compress my images, hope it works :) 
    AddOutputFilterByType DEFLATE image/gif 
    AddOutputFilterByType DEFLATE image/png 
    AddOutputFilterByType DEFLATE image/jpg 
    AddOutputFilterByType DEFLATE image/jpeg 

    # Remove browser bugs (only needed for really old browsers) 
    BrowserMatch ^Mozilla/4 gzip-only-text/html 
    BrowserMatch ^Mozilla/4\.0[678] no-gzip 
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
    Header append Vary User-Agent 
</IfModule> 

#DEFAULT HOME PAGE FOR ERROR 500 
ErrorDocument 500 /index.html 


#BLOCK LINKS CRAWLING BOTS (I have tried using the below codes with #, 
#but that didn't achieve my goal, so i'm #ing them out for now) 
#<Limit GET POST PUT> 
#BrowserMatchNoCase AhrefsBot bad_bot 
#BrowserMatchNoCase ia_archiver bad_bot 
#BrowserMatchNoCase LinkpadBot bad_bot 
#BrowserMatchNoCase MJ12bot bad_bot 
#BrowserMatchNoCase rogerbot bad_bot 
#BrowserMatchNoCase spbot bad_bot 
#BrowserMatchNoCase SearchmetricsBot bad_bot 
#BrowserMatchNoCase SemrushBot bad_bot 
#BrowserMatchNoCase SEOkicks-Robot bad_bot 
#BrowserMatchNoCase spbot bad_bot 
#BrowserMatchNoCase SiteExplorer bad_bot 
#BrowserMatchNoCase BLEXBot bad_bot 
#BrowserMatchNoCase NinjaBot bad_bot 
#Order Deny,Allow 
#allow from all 
#Deny from env=bad_bot 
#</LIMIT> 
+1

Apacheのエラーログを確認してください。これは、あなたのhtaccessで何が違うのか、あなたのサーバーでは許可されていないことを教えてください。 – user1915746

+0

FWIW私の問題はあなたの '.htaccess'ファイルが原因ではないと思います。 'ErrorDocument 500/index.html'を除いて、'/index.html'は実際にはあなたのメインサイト外のエラー文書です。それは500エラーの_cause_ではありませんが。 500エラーを発生させるリクエストのパターンはありますか?しかし、user1915746がすでに述べたように、このエラーの詳細については、エラーログを確認する必要があります。 – MrWhite

答えて

0

あなたのご意見ありがとうございます。 問題は私のホスティングから来ているとわかりました。 (これはマルチホスティングパッケージです)IPでホストされているすべてのサイトに問題があります。私はIPの下で別のブランドの新しいサイトをホストしたときにこれを確認しました。その次の日に新しいサイトはエラー500も出始めました。

ホスティングプロバイダの男は、トラフィックの結果としてそう言っていました。ホスティングサービスの現在のプロセス制限に達しています。現在のプロセス制限は25です。この男は1000への増加を示唆しています。

この情報が問題を解決する場合は、この情報を更新します。

ありがとうございました。