当前位置:网站首页>访问域名直接访问wordpress
访问域名直接访问wordpress
2022-08-01 16:41:00 【小胡yhu】
很多时候,我们会以文件夹的形式把wordpress程序放在服务器的根目录,一是为了美观,二是便于多个目录管理,但这是就会有一个问题,我们访问的时候要加上文件夹名,访问地址就是:http://www.xxx.com/wordpress,直接用域名 比如:http://www.xxx.com是无法访问的,这时候很多人选择了把程序直接解压放到网站的跟目录。其实还有一个简单的方法,不用转移,不影响美观,简单实用!
1.首先把程序里的“index.php”复制一份到网站的根目录,然后打开,默认的格式如下:
/** Loads the WordPress Environment and Template */
require(‘/wp-blog-header.php’);
2.其实我们只需要把你存放程序的文件夹名加入到路径里面即可,样式:require(‘./你的程序文件夹名/wp-blog-header.php’);
例如我的就是:require(‘/wordpress/wp-blog-header.php’);
3.保存后,现在直接访问域名就可以打开网站了!
边栏推荐
- 沈腾拯救暑期档
- MySQL INTERVAL 关键字指南
- Go unit tests
- untiy Resorces目录动态加载资源
- 京东软件测试面试题,仅30题就已经拯救了50%的人
- DOM series of touch screen events
- Bugku-Misc-贝斯手
- MySQL's maximum recommended number of rows is 2000w, is it reliable?
- ESP8266-Arduino programming example-GA1A12S202 logarithmic scale analog light sensor
- 金仓数据库 OCCI迁移指南(2. 概述)
猜你喜欢
随机推荐
LeetCode Week 303
mysql源码分析——聚簇索引
08 spark 集群搭建
今晚直播!
Use Canvas to implement mobile phone signature
Isometric graph neural networks shine in drug discovery
每日优鲜大败局
Winform的UI帮助类——部分组件会使用到DevExpress组件
04 flink 集群搭建
Flask框架实战
MUI as a mobile phone to return to the action bar
Winform message prompt box helper class
C#的路径帮助类
2022年深圳市临床医学研究中心申请指南
[ACNOI2022]物品
5年测试,只会功能要求17K,功能测试都敢要求这么高薪资了?
C#的DataTable帮助类
【paper】Cam2BEV论文浅析
The site is not found after the website is filed. You have not bound this domain name or IP to the corresponding site! The configuration file does not take effect!
网站备案后没有找到站点 您没有将此域名或IP绑定到对应站点! 配置文件未生效!