Wordpress 404 problem

2019-06-10 07:08发布

I have a wordpress blog and I need to add a php file on the website. The problem is whatever php file I upload to the website, I get a Wordpress generated 404 error.

I believe this is a .htaccess or permissions error, but I can't find any fix for it.

File: .htaccess

# -FrontPage- 
#IndexIgnore .htaccess /.?? ~ *
# */HEADER /README /_vti 
<Limit GET POST>
    order deny,allow deny from all allow from all
</Limit> 
<Limit PUT DELETE> 
    order deny,allow deny from all 
</Limit> 
AuthName doctortipster.com 
AuthUserFile /home/doctips/public_html/_vti_pvt/service.pwd 
AuthGroupFile /home/doctips/public_html/_vti_pvt/service.grp

# 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

Do you have any idea what could cause it?

Thanks

标签: php wordpress
2条回答
迷人小祖宗
2楼-- · 2019-06-10 07:35

I have fixed the problem. The file had 666 permissions. I've set it to 644 and it now works.

查看更多
来,给爷笑一个
3楼-- · 2019-06-10 07:46

Try this line:

RewriteRule   PATH/TO/YOUR/SCRIPT.php - [L]
查看更多
登录 后发表回答