.htaccess 500错误

时间:2011-09-10 23:11:56

标签: .htaccess mod-rewrite

.htaccess文件中的以下代码导致500错误的原因是什么?

User-agent: * 
Disallow: /

RewriteEngine On

RewriteBase /
RewriteRule ^([a-zA-Z0-9\-_]+)\.shtml /$1.php
RewriteRule ^Marketing-Resources/([a-zA-Z0-9\-_]+)\.shtml /Marketing-Resources/$1.php
RewriteRule ^Affiliates/([a-zA-Z0-9\-_]+)\.shtml /Affiliates/$1.php
RewriteRule ^Help/([a-zA-Z0-9\-_]+)\.shtml /Help/$1.php
RewriteRule ^Specialty-Lists/([a-zA-Z0-9\-_]+)\.shtml /Specialty-Lists/$1.php

如果重要,则文件位于子域的文件夹中。

1 个答案:

答案 0 :(得分:5)

User-agent: * 
Disallow: /

这两行通常属于robots.txt,而不是.htaccess ......