所以我有一个index.php
文件,我想通过domain.com/custom/path/index.php
访问它[我知道index.php
不需要在那里,因为浏览器会自动抓取它,但为了这个问题,我想我只是输入它],
但是当我进入这个路径时,wordpress启动并显示默认的No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
它为什么这样做?我该怎么补救呢?
谢谢。
您需要在.htaccess文件中添加一个重写规则,类似于:
RewriteRule ^custom/path/.*$ - [L]
[L]告诉服务器停止尝试在它之后重写URL