2017-06-24 6 views
0

Vor einiger Zeit habe ich die .htaccess-Datei meiner Site bearbeitet. Später habe ich ein temporäres ERROR 500 Problem festgestellt. Eine Minute meine Website kann von Google geholt werden, die nächste Minute ist es Fehler 500.Interner Serverfehler 500

Ich überprüfte godaddy und sie sagen, dass das Problem wahrscheinlich von meiner .htaccess-Datei kommen wird. Jetzt ist das Problem, ich kann nicht herausfinden, was mit meiner .htaccess Datei falsch ist. Ich brauche Hilfe. Hier ist meine .htaccess Datei unten.

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

Überprüfen Sie Ihr Apache-Fehlerprotokoll, es sollte Ihnen sagen, was nicht ok mit yout htaccess oder nicht auf Ihrem Server erlaubt ist. – user1915746

+0

FWIW Ich glaube nicht, dass das Problem durch Ihre '.htaccess' Datei verursacht wird - es sieht OK für mich aus. Abgesehen von der 'ErrorDocument 500/index.html' - ist'/index.html' wirklich das gewünschte Fehlerdokument (außerhalb Ihrer Haupt-Site)? Obwohl das nicht der Grund für Ihren 500 Fehler ist. Gibt es ein Muster für die Anfragen, die den Fehler 500 auslösen? Aber wie Benutzer1915746 bereits erwähnt hat, müssen Sie Ihr Fehlerprotokoll auf die Details dieses Fehlers prüfen. – MrWhite

Antwort

0

Danke für Ihre Eingabe alle. Ich fand heraus, dass das Problem von meinem Hosting kam. (Es ist ein Multi-Hosting-Paket) Alle auf der IP gehosteten Seiten haben das Problem. Ich bestätigte dies, als ich eine andere brandneue Seite unter der IP veranstaltete, am nächsten Tag fing die neue Seite an, den Fehler 500 auch zu bekommen.

Der Typ vom Hosting-Anbieter sagte, dass es als Folge des Verkehrs ist. Das aktuelle Prozesslimit für den Hosting-Service wird erreicht. Das aktuelle Prozesslimit ist 25. Der Typ schlägt eine Erhöhung auf 1000 vor.

Diese Information wird aktualisiert, wenn das Problem dadurch behoben wird.

Danke.

Verwandte Themen