开发者

wordpress 500 - Internal server error

I installed the wordpress 2.9.2 a few days ago and it works correctly. today , i want to use permlink feature of wordpress.

I know , must modify my .htaccess file on my site root. but on my sub-domain root there is no any .htaccess file . so i create my .htacess file with follow content on sub-domain root (near index.php file):

<files .htaccess>
order allow,deny
deny from all
</files>

ServerSignature Off

<files wp-config.php>
order allow,deny
deny from all
</files>

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

# END WordPress

Options All -I开发者_如何学编程ndexes
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

But after save it , i missed my blog . And i get follow error :

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

after this i remove the .htaccess file , but this was not correct.

What i can do for it?

Cheers


I'm not sure what your other settings are there, but your rewrite block is correct. Try removing the rest of the contents of the file all together and see what happens. It may just be that you have more than you even need. Here is the entirety of my .htaccess for one of my WordPress installs with permalinks working correctly.

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

# END WordPress

- EDIT -

Also, that .htaccess is from a root domain that has sub-domains working accordingly without additional files or modification to the .htaccess.


Seems like a .htaccess file does not exist by default. But when you explicitly change the permalink structure by going to Settings->Permalinks in the WP admin area, a .htaccess file is automatically deleted. So, you may try to delete your current .htaccess file and then enable permalikns from admin area and .htaccess file will be automatically generated. First, my Wp install had no .htaccess file but when I altered the Permalink structure, here's what I got in my .htaccess file:

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

# END WordPress


I changed the .htaccess file with follow Content:

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

# END WordPress

But nothing happens and we have error again.

The amazing thing is: I removed the file, but the error is still there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜