By using this site, you agree to the Privacy Policy and Terms of Use.
接受
智诚云集
  • 首页
  • 互联网
  • 分享
  • 记录
  • 互联网
    • Blog Index
    • Search Page
    • 404 Page
  • 联系
阅读: Discuz论坛Linux伪静态规则(Rewrite).htaccess
SUBSCRIBE
智诚云集智诚云集
Font ResizerAa
  • 云服务器推荐
  • 腾讯云
  • 阿里云
  • 京东云
Search
  • Home
  • Home
  • Blog
  • Blog
  • Categories
    • Technology
    • Travel
    • Lifestyle
    • Market
    • Innovate
    • Insurance
  • Categories
    • Technology
    • Travel
    • Lifestyle
    • Market
    • Innovate
    • Insurance
  • Bookmarks
  • Bookmarks
  • More Foxiz
    • Blog Index
    • Sitemap
  • More Foxiz
    • Blog Index
    • Sitemap
  • Contact
  • Contact
Have an existing account? 登录
关注我们
© Foxiz News Network. Ruby Design Company. All Rights Reserved.
Discuz

Discuz论坛Linux伪静态规则(Rewrite).htaccess

智诚云集 - Xyok.Cn
最后更新: 2025年12月6日 下午9:18
智诚云集 - Xyok.Cn
11 Min Read
分享
分享

本地新建TXT文档将下方规则放入保存,使用FTP上传工具(FlashFXP、FileZilla)上传到网站根目录,然后在FTP中右键重名命名为.htaccess。(注意:操作之前需要在discuz论坛管理员后台开启伪静态及相关设置)


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:Host} ^xyok.cn$
RewriteRule (.*) http://www.xyok.cn$1 [NC,R=301]
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
标签:DiscuzFileZillaFlashFXPhtaccesslinux伪静态
分享这篇文章
Facebook Email Copy Link Print
By智诚云集 - Xyok.Cn
关注:
分销:阿里云、腾讯云、百度云、GoDaddy、景安云、Linode云服务器产品。
上一篇 国内云服务商和域名注册商整理(2019.11.6)
下一篇 WordPress通过RSS订阅Feed屏蔽第三方采集

You Might Also Like

Discuz

发帖编辑器使用和各项功能设置

  不多做…

0 Min Read
分享

Windows/Linux版Visual Studio Code中国镜像下载

今天使用基于Linu…

5 Min Read
Discuz

Discuz论坛开启导读「最新发表/热门/回复/精华」更改

找到source\m…

2 Min Read
Discuz

【公告】关于Discuz应用中心以及盗版正版问题总结

购买问题: 1、我方…

6 Min Read
智诚云集智诚云集
关注我们
© Foxiz News Network. Ruby Design Company. All Rights Reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?