返回顶部
众耀资讯 众耀分享 行业动态

本地线上WordPress网站的静态链接设置方法

2017-10-11分享

最近很多人在本地或者线上搭建WordPress网站的时候,发现搭建好的链接选择“朴素”类型还是动态的地址,其次很多同学在线搭建的时候也按照这样的方法去设置,而没有去设置静态路径,另外也有一些空间是不支持静态显示的,今天将会仔细的解决这个问题。

例如:你现在的栏目地址是http://127.0.0.1/?cat=3,那么设置好之后后面显示的显示的将是http://127.0.0.1/jichu,达到我们静态地址的标准。

 


设置方法一、

1、打开WordPress固定链接设置

在Wordpress后台找到“设置→固定链接”

 

2、选择“自定义结构”

①:在自定义结构输入

/%category%/%post_id%.html

②:在分类目录前缀里面填写 .  (填写一个点,这里一定不要搞错了)

本地线上WordPress网站的静态链接设置方法1


 

设置方法二

第一种方法在针对一些在线网站的时候可能是无法实现的,那么实施第二种方法。

1、打开Wordpress固定链接设置

在Wordpress后台找到“设置→固定链接”

 

2、选择“自定义结构”

在自定义结构输入

/%category%/%post_id%.html

小点就不需要输入了!!!

 

3、安装插件“No category

这个插件的功能就是替代“分类目录前缀”的那个点的作用。

 

以上就是本地线上Wordpress网站静态链接设置,根据你的空间去设置适应哪种方法就用哪种。大家get到了么?祝周末愉快!
 

Recently a lot of people in the local or online build WordPress website, found that to build a good choice of links of "simple" type or dynamic address, followed by a lot of students to build online when the method to set up, but not to set the static path, there are also some space does not support static display, will today to solve this problem carefully.
For example: your current column address is http://127.0.0.1/, cat=3, then set up, then display the display will be http://127.0.0.1/jichu, to our static address standards.
Setting method one,
1, open the WordPress fixed link settings
Find settings "fixed links" in the Wordpress background"
2, select custom structure"
Custom structure input
/%category%/%post_id%.html
Fill in the prefix of the catalogue. (fill in a dot, you must make sure there is no mistake here.)
Setting method two
The first approach may be impossible for some online sites, so implement second methods.
1, open the Wordpress fixed link settings
Find settings "fixed links" in the Wordpress background"
2, select custom structure"
Custom structure input
/%category%/%post_id%.html
The dots don't need to be typed in!!!
3, install the plug-in "No category""
The function of this plug-in is to replace the point at which the prefix of the category prefix functions.
The above is the local online Wordpress site static link settings, according to your space to set which method to adapt to what kind of. Is everybody get here yet? Have a nice weekend!
在线咨询
Copyright&www.zhongyaokeji.com 2015-2018 众耀科技 版权所有 哈尔滨珠江路3号4层创客巢-众耀科技