Discuz伪静态 配置搜索引擎优化(URL重写) apach

乐清SEO_开发应用_Discuz_ 乐清SEO2021-01-19 转载自:

完全启用勾选

URL静态化全选

Rewrite 兼容性勾选

Discuz伪静态 配置搜索引擎优化(URL重写) apache配置

 

 

在apache配置文件中设置

  1. <IfModule mod_rewrite.c>  
  2. RewriteEngine On  
  3. RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2  
  4. RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3  
  5. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3  
  6. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3  
  7. RewriteRule ^/home/(space|network)-(.+)\.html$ /home/$1\.php\?rewrite=$2  
  8. RewriteRule ^/home/(space|network)\.html$ /home/$1\.php  
  9. RewriteRule ^/home/([0-9]+)$ /home/space\.php\?uid=$1  
  10. RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2  
  11. </IfModule>