WordPress 3.0 及更高版本后 404 一直杀了我
自 Wordpress v3.0 以来,您做了什么,所有直接 PHP 文件都无法在 WP 中工作,所有都返回 404 page not found
,我创建了一个插件,它正在加载 /wp-content /plugins/myplugin/direct.php
文件,我现在看到了什么,它向我显示了我的 WP 网站,标题为 PAGE NOT FOUND 404
,请帮助我,我无法使用 WP任何此外,所有直接 PHP 文件都无法访问并被跟踪为 404
。 我应该怎么做才能关闭那个可怕的 404
或加载我的 php 文件。
what have you done since Wordpress v3.0, all direct PHP files are not working in WP, all are returning 404 page not found
, I have created one plugin, it's loading /wp-content/plugins/myplugin/direct.php
file and what am I seeing now, it shows me my WP site with title PAGE NOT FOUND 404
, help me please I can't work with WP any more, all direct PHP files are not accessible and tracked as 404
.
What should I do to turn off that terrible 404
or get my php files loaded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据提供的重写规则,我建议改用它:
Based on the provided rewrite rules, I would suggest to use this instead:
我不明白这个问题。您是说您已经创建了一个插件,但它没有正确调用文件? (我假设“直接 PHP 文件访问”意味着您无法加载插件目录中的特定文件?)
听起来您没有使用正确的路径。您应该使用通过 WordPress (http://codex.wordpress.org/Determining_Plugin_and_Content_Directories) 设置的 WP_PLUGIN_URL 常量之类的东西 - 即这听起来不像 .htaccess 问题,听起来像是插件中的编码不正确。
当然,如果不知道您正在使用什么代码,就很难说出问题所在。
I'm not understanding the question. You're saying that you've created a plugin, and it's not calling in the files properly? (I'm assuming by "direct PHP file access" you mean you can't load a particular file that's within your plugin directory?)
Sounds like you're not using the correct paths. You should be using things like WP_PLUGIN_URL constants that are set up for you via WordPress (http://codex.wordpress.org/Determining_Plugin_and_Content_Directories) - i.e it doesn't sound like an .htaccess issue, it sounds like improper coding in the plugin.
Of course, without knowing what code you are using, it's difficult to say what the issue could be.
检查你的
.htaccess
文件,也许所有URL
现在都映射到Wordpress的index.php
文件了。Check your
.htaccess
file, maybe allURLs
now are mapped to theindex.php
file of Wordpress.