国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > Wordpress > 正文

nginx下wordpress子目錄偽靜態設置步驟詳解

2024-09-07 00:52:17
字體:
來源:轉載
供稿:網友

子目錄偽靜態可以讓我們不帶參數并顯示為目錄或html了,這樣有利于搜索引擎對網站的抓取了,下面我們來看一些例子.

網站訪問目錄為http://show.abc.com/,但是wordpress是裝在他下面的manage目錄中的,所以訪問到的首頁也該是http://show.abc.com/manage/

而wordpress默認訪問文章的URL是http://show.abc.com/manage/?p=12 的形式,需要做偽靜態使文章訪問形式為http://show.abc.com/manage/12

在nginx中配置如下:

  1. server { 
  2. listen  80; 
  3. server_name     show.Vevb.com; 
  4. access_log      logs/access_show.abc.com.log; 
  5. error_log       logs/error_show.abc.com.log; 
  6.  
  7. index   index.html index.php; 
  8.  
  9. location / { 
  10.         root    /web/html/show; 
  11.  
  12. location /manage/ { 
  13.         try_files $uri $uri/ /manage/index.php; 
  14.  
  15. location /manage/wp-content { 
  16.         alias   /web/html/show/manage/wp-content; 
  17. location /manage/wp-includes { 
  18.         alias   /web/html/show/manage/wp-includes; 
  19. location /manage/wp-admin { 
  20.         alias   /web/html/show/manage/wp-admin; 
  21. }  
  22.  
  23. location ~ /.php$ { 
  24.         root           /web/html/show; 
  25.         fastcgi_pass   127.0.0.1:9001; 
  26.         fastcgi_param  SCRIPT_FILENAME  /web/html/show$fastcgi_script_name; 
  27.         include        fastcgi_params; 
  28. }

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 乡宁县| 财经| 义马市| 武威市| 盐池县| 蒙自县| 堆龙德庆县| 巴彦淖尔市| 鲜城| 武功县| 淮南市| 邓州市| 辽源市| 炉霍县| 漳州市| 交口县| 旬邑县| 临沭县| 新晃| 普安县| 永清县| 富顺县| 邢台市| 新乡市| 合山市| 定兴县| 应用必备| 松阳县| 虞城县| 淳化县| 汶川县| 鄂州市| 昌吉市| 开鲁县| 特克斯县| 大庆市| 札达县| 霸州市| 施甸县| 长寿区| 柳林县|