[英]Directory outside Wordpress delivering 404 — just on subdomain
I have a very basic Wordpress install, with WP in root and permalinks on. 我有一个非常基本的Wordpress安装程序,在根目录和永久链接上都带有WP。 For external directories I set up, things are working fine, no matter what's in them.
对于我设置的外部目录,无论其中包含什么内容,一切都可以正常工作。
BUT, I recently replicated the site on a subdomain, to use as a dev site. 但是,我最近在子域上复制了该站点,以用作开发站点。 That site has its own files, and its own database.
该站点具有自己的文件和数据库。 On it, any php files in external directories are resulting in a WP-served 404 error.
在此文件上,外部目录中的任何php文件都将导致WP服务的404错误。 It serves html files within those directories just fine.
它在这些目录中提供html文件就可以了。
To recap: mysite.com -- Wordpress site, all is fine 回顾一下:mysite.com-WordPress网站,一切都很好
mysite.com/kitties/file.html --> html file outside of WP, fine. mysite.com/kitties/file.html-> WP之外的html文件,很好。
mysite.com/kitties/file.php --> php file, outside WP, fine. mysite.com/kitties/file.php-> WP之外的php文件,很好。
dev.mysite.com --> Wordpress site, all is fine dev.mysite.com-> WordPress网站,一切都很好
dev.mysite.com/kitties/file.html --> html file outside of WP, fine. dev.mysite.com/kitties/file.html-> WP之外的html文件,很好。
dev.mysite.com/kitties/file.php --> php file outside of WP, returns WP-served 404 dev.mysite.com/kitties/file.php-> WP之外的php文件,返回WP服务的404
My .htaccess file is below, and standard, but given that the problem is only on the dev site, I don't know that it has anything to do with htaccess, and wonder if it's an apache configuration issue? 我的.htaccess文件在下面,并且是标准文件,但鉴于问题仅在开发站点上,我不知道它与htaccess有关系,并且想知道这是否是apache配置问题?
# 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
When Moving / duplicating a site it is usually wise to resave the permalink settings, even when nothing changes. 移动/复制站点时,即使没有任何更改,通常也要保留永久链接设置。 Did you change the url in the settings of
wp-config
? 您是否在
wp-config
的设置中更改了URL?
After that it is also wise to check the database for urls ( tool ). 之后,检查数据库中的url( 工具 )也是明智的。
Try those and see if the problem still exists. 尝试那些,看看问题是否仍然存在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.