By using this site, you agree to the Privacy Policy and Terms of Use.
接受
智诚云集
  • 首页
  • 互联网
  • 分享
  • 记录
  • 互联网
    • 社会
    • 网文
    • 站推荐
    • 网络用语
    • 贵金属
  • 帮助%Help
    • Blog Index
    • Discuz
    • Wordpress
  • Contact
正在阅读: Discuz论坛Linux伪静态规则(Rewrite).htaccess
Xyok Gather

智诚云集

WordPress|Discuz|ThinkPHP|SEO优化|推广营销|中小企业网站建设服务 - Xyok Gather

字体大小调整Aa
  • - Recommend -
  • [腾讯云]99元/年
  • [阿里云]38元/年
  • [京东云]49元/年
  • [七牛云]CDN/10G
Search
  • Home
  • Blog
  • Categories
    • Technology
    • Travel
    • Lifestyle
    • Market
    • Innovate
    • Insurance
  • Bookmarks
  • More Foxiz
    • Blog Index
    • Sitemap
  • Contact
已有账户? 登录
关注我们
  • Home
  • World
  • Market
  • Contact
  • Blog
© Foxiz News Network. Ruby Design Company. All Rights Reserved.
Discuz

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

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

本地新建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
- Open WeChat to follow -
Ad image
标签:DiscuzFileZillaFlashFXPhtaccesslinux伪静态
分享本文
电子邮件 复制链接 打印
作者智诚云集 - Xyok.Cn
关注:
分销:阿里云、腾讯云、百度云、GoDaddy、景安云、Linode云服务器产品。
上一篇文章 国内云服务商和域名注册商整理(2019.11.6)
下一篇文章 WordPress通过RSS订阅Feed屏蔽第三方采集
- Open WeChat to follow -
Ad image
- Advertisement -
- Advertisement -
随机阅读
拼多多"送货入村"千亿扶持能否成功实施拭目以待
社会
开源Ai人工智能OpenClaw中文龙虾
话唠
解决电脑提示U盘需要格式化
记录
高德地图app"我要报警"快速上报具体位置
分享
阿里云边缘安全加速ESA免费版0元续费几十年
分享
拼多多多店铺同款打折优惠到底有多离谱?
记录

精选阅读·Selected readings

Discuz

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

  不多做…

0 分钟阅读
记录

DiscuzX 3.5 测试版下载(仅测试不建议用于升级)

很多Discuz站长…

3 分钟阅读

[用户-审核用户]注册审核/邀请注册/审批会员

  此功能…

0 分钟阅读
Discuz

【找不到相关设置请使用右上角「搜索」功能】

0 分钟阅读
Copyright © 2026 · 智诚云集 · 技术支持 Xyok Gather.
苏ICP备11081889号-3 苏公网安备32038102000146号 Xyok Gather
Welcome Back!

Sign in to your account

用户名或电子邮件地址
密码

忘记密码?