我的网站www上一直存在持续且间歇性的500内部服务器错误。 lemmymorgan。 COM。除非我删除或重命名我的public_html文件夹中的.htaccess文件,否则此错误将保持不清除状态。重命名后几分钟,我注意到.htaccess文件上有一些代码/重写。
我的网站是wordpress,基本的htacess内容曾经是:
# 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
.htaccess new .htaccess创建后的秒数,代码将变为:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+.*-.*-.*-.*-.*-.*-.*[0-9]+..*$ ?$1$3=$2&%{QUERY_STRING}[L]
</IfModule>
and currently, i have a more complicated code in my .htaccess file that led to the 500 error few hours ago:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*-.**\/.*[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+).*-.*-.*-.*-.*-.*-.*-[0-9]+.*-.*-.*-.*-[0-9]+-.*-.*-\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*\/.*[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-[0-9]+.*-.*-.*-.*-.*-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-.*\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)\/\(.*\)-.*-.*-.*-[0-9]+-.*-.*\/.*[0-9]+\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+).*-.*%[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+-.*[0-9]+-.*\/.*[0-9]+\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+-.*-.*-.*-[0-9]+-[0-9]+-.*-.*\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*\)\/.*[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+).*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-.*-.*-.*\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+).*-.*-.*-\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+-[0-9]+-.*-.*-.*-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+\/.*[0-9]+\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*-.*-[0-9]+.*-.*\/[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)\/.*[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)\/\(.*\)-.*-.*-.*-.*[0-9]+-[0-9]+-[0-9]+-.*-.*-.*-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+-.*\/.*[0-9]+\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-\(.*[0-9]+-.*\)-.*-.*-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*\/.*[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+).*-.*%[0-9]+-.*-.*-.*-.*-.*-.*[0-9]+-[0-9]+-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+-[0-9]+-[0-9]+-[0-9]+-.*-.*\/.*[0-9]+\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+).*-.*-[0-9]+-.*-.*-.*-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*\/.*[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*-.*-.*-.*-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+-[0-9]+-[0-9]+-[0-9]+\/.*[0-9]+\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-.*-\(.*-.*\/$ ?$1$3=$2&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)\)\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteRule ^([0-9]+)\/([^\d\/]+)([0-9]+)-.*-.*-.*-.*-[0-9]+\/$ ?$2$1=$3&%{QUERY_STRING}[L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^([^\d\/]+)-([0-9]+)-([0-9]+)-[0-9]+.*-.*-.*-.*-.*-.*-.*[0-9]+..*$ ?$1$3=$2&%{QUERY_STRING}[L]
</IfModule>
请帮我解决这个问题,因为我不是php编码的极客。只是帮我纠正这个问题,以便我替换或教我如何做。