简体   繁体   中英

Access a stand-alone php file with WordPress installed

I'm wanting to upload a standard php file to the root of my website which also has WordPress installed. I think there is something with the .htaccess file that's not letting me access a file even if it exists but instead passing every call through to WordPress's index.php file which in turn throws me to a WordPress 'page can't be found'.

I've looked through similar questions on here with no avail.

What I'm thinking is there is something funky going on, or I need to modify my .htaccess from the standard one that ships with WordPress or ??

Any help is appreciated!!

Thanks in advance, Mark

如果您的文件名为foo.php ,请将此行添加到.htaccess文件中,位于RewriteEngine on正下方:

RewriteRule ^foo.php$ - [L]

添加一个具有您要访问的文件名的RewriteCond ,以检查当前文件是否为您要访问的文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM