当前位置:网站首页>How to set pseudo static for WordPress fixed links
How to set pseudo static for WordPress fixed links
2022-07-25 23:08:00 【fmamcn】

wordpress The default link form of the page is ” simple ” The way ( for example : http:// domain name /?p=123)
This dynamic URL Links are not convenient for search engines , So , We need to set it to several other common Fixed links form , Such as http://www.zztuku.com The choice is 【 Custom structure 】.
The setting method is as follows :
Get into wordpress Home page of background system , Click menu 【 Set up 】- 【 Fixed links 】

choice 【 Common settings 】 Under the 【 Custom structure 】 , You can select a single label or multiple label combinations , Customizable splicing string , This site uses /%post_id%.html, After filling in , Click on 【 Save changes 】 Effective .

After saving the changes , Although the links of articles or pages become fixed links , But when visiting the page , Instead, it becomes a download operation , Cannot access this URL Address , You need to configure nginx Of Pseudostatic (URL Rewrite) The rules .
The following is a nginx Configuration of , It needs to be modified to your own domain name and root route .
- server {
- listen 80;
- server_name www.example.com;
- root /usr/local/www/wordpress;
- index index.php index.html index.htm;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- location ~ \.php$ {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
After modifying the configuration , restart nginx Effective , Resume normal access .
- systemctl restart nginx.service
Website of this article :https://www.zztuku.com/cms-1401.html
Please state that the reprint is from : Stationmaster Gallery - Wordpress How to set pseudo static for fixed links
边栏推荐
- 单模型常识推理首超人类!HFL登顶OpenBookQA挑战赛
- HJ7 取近似值
- Servlet overview
- Notification(状态栏通知)详解
- Summary of common methods of string:
- Wamp MySQL empty password
- Why is Google's internal tools not suitable for you?
- The difference between overloading and rewriting
- Similarities and differences between equals and "= ="
- Simulink learning notes (III) - Simulink automatic code generation (II) "suggestions collection"
猜你喜欢

Mongodb的特点、与MySQL的差别、以及应用场景

通用分页功能

Experience of machine learning with Google Lab

Network Security Learning (XII) OSI and TCP

VisualBox启动虚拟机报错:The VM session was closed before any attempt to power it on.

Hcie is finally in hand, and the road begins

CUDA environment construction

Tencent map API request source is not authorized, this request source domain name

Drive board network cable directly connected to computer shared network configuration

Longitude and latitude and its transformation with coordinate system
随机推荐
Call Gaode map -- address is converted into longitude and latitude
The difference between "= =" and equals
wordpress去掉网站发布时间
Network Security Learning (XIV) IP protocol
单元测试,写起来到底有多痛?
Sichuan cuisine menu (I)
向下扎根,向上生长,探寻华为云AI的“根”力量
第二周学习:卷积神经网络
5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)
赋能合作伙伴,亚马逊云科技如何落地“扶上马,送一程”?
General paging function
Mongodb features, differences with MySQL, and application scenarios
Enterprise level inventory management system of code audit
The difference between "rewrite" and "overload"
Stack and stack class
【论文笔记】基于在线预测和规划的机器人动态跟踪抓取方法
Hcie is finally in hand, and the road begins
QT operation to solve large amount of duplicate data
[paper notes] a meta reinforcement learning algorithm for causal discovery
Panzer_ Jack's personal blog founding day