开发者

.htaccess file broke my WP site

All I added was server authorization. I did开发者_C百科 it on top of the existing WordPress .htaccess stuff I found in there.

The authorization works, great, btw. But now I get a "500 Internal Server" error. I'm new to WP and I'm assuming this .htaccess file came standard with the install. Perhaps it's just something obvious I can't see for some reason?

Order deny,allow
Deny from all
AuthType Basic
AuthUserFile .htpasswd
AuthName "PROTECTED ZONE"
require valid-user
Satisfy Any
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /devip/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /devip/index.php [L]
</IfModule>


Can you view your apache error.log? internal server errors should be logged in there. Probably some little error in the htaccess file.


Does the file .htpasswd exist? It is searched relative to the ServerRoot.

Apache manual:

File-path is the path to the user file. If it is not absolute (i.e., if it doesn't begin with a slash), it is treated as relative to the ServerRoot.

My guess is that it's not sitting in the ServerRoot directory on your server. Please check it and correct the path if needed.


500 Server errors sometimes have to do with the character encoding of the .htaccess file. I made that mistake when I first started working with WordPress and .htaccess files.

What kind of text editor did you use to edit .htaccess? With a Windows PC, you should use Notepad and save as plain text. On a Mac, use TextEdit and save as plain text. Or use GoDaddys's file manager and open and save the file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜