[英]The requested URL was not found on this server. - php, wordpress
I have the following folder structure on my local -我在本地有以下文件夹结构 -
xampp\htdocs\wordpress\wp-content\themes\mdbblog
on my local and under this directory, have following files -在我的本地和这个目录下,有以下文件 -
I activated mdblog
theme from http://localhost/wordpress/wp-admin/
and able to access the index page of my site http://localhost/wordpress
.我从http://localhost/wordpress/wp-admin/
激活了mdblog
主题,并且能够访问我的站点http://localhost/wordpress
的索引页面。
The problem is I am unable to href any other page from home page.Following is my code to access Gallery in the menu -问题是我无法从主页href任何其他页面。以下是我在菜单中访问图库的代码 -
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">Gallery</a>
<div class="dropdown-menu dropdown-primary" aria-labelledby="navbarDropdownMenuLink">
<a class="nav-link" style="padding:5px 10px;" href="./clinic-gallery-page.php">Clinic </a>
<a class="nav-link" style="padding:5px 10px;" href="patients-gallery-page.php">Patients</a>
</div>
</li>
When I click Clinic
, I get following error -当我单击Clinic
,出现以下错误 -
I have no clue as what am I doing wrong here.我不知道我在这里做错了什么。 I new to PHP and Wordpress.我刚接触 PHP 和 Wordpress。 I also don't see any pages present under mdblog
theme on admin.我也没有在管理员的mdblog
主题下看到任何页面。 Is that expected?这是预期的吗? Any help is much appreciated.任何帮助深表感谢。
Ok, sooo WordPress isn't exactly a file request type system.... WordPress will only resolve based on your db... Read te docs or ask more direct questions.好吧,所以 WordPress 不完全是一个文件请求类型系统.... WordPress 只会根据您的数据库进行解析...阅读 te 文档或提出更直接的问题。 I advise you:我劝你:
Big warning.大警告。 When you create a localhost page on development, this will be written like that on your db.当你在开发中创建一个 localhost 页面时,这将在你的数据库上写成这样。 When you take this to a production server, you will end up with some links as localhost and some as the domain.当你把它带到生产服务器时,你最终会得到一些作为 localhost 的链接和一些作为域的链接。 U will either always have to redirect, or before you upload your db to production, you can dump the sql, and do a find localhost and replace with your new domain on notepad ++你要么总是必须重定向,或者在你将数据库上传到生产之前,你可以转储 sql,并在记事本++上查找本地主机并替换为你的新域
Unless you are creating your own theme.除非您正在创建自己的主题。 I wouldn't add files directly to your theme as it can be overwritten on an update.我不会将文件直接添加到您的主题中,因为它可能会在更新时被覆盖。 Create a plugin.创建一个插件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.