返回列表 发帖
查看: 1824|回复: 6

[求助] 谁帮我写一条伪静态规则

15

主题

44

回帖

90

积分

渐入佳境

贡献
0 点
金币
28 个
发表于 2022-1-6 22:40:40 | 显示全部楼层 |阅读模式
目前是这样的规则
  1. <rule name="t" stopProcessing="true">
  2.                     <match url="^(.*)$" ignoreCase="false" />
  3.                     <conditions logicalGrouping="MatchAll">
  4.                         <add input="{HTTP_HOST}" pattern="^t.jatxh.cn$" />
  5.                     </conditions>
  6.                     <action type="Redirect" url="http://www.jatxh.cn/{R:0}" redirectType="Permanent" />
  7.                 </rule>
复制代码
这个只能实现t.jatxh.cn/index.php?mod=topic&code=2156跳转到www.jatxh.cn/index.php?mod=topic&code=2156

我想实现把t.jatxh.cn/index.php?mod=topic&code=2156跳转到www.jatxh.cn
不管t.jatxh.cn后面的目录啥全部跳转到www.jatxh.cn
我知道答案 回答被采纳将会获得1 贡献 已有6人回答
回复

使用道具 举报

20

主题

730

回帖

1010

积分

已臻大成

贡献
26 点
金币
74 个
发表于 2022-1-7 02:23:09 | 显示全部楼层
先在后台开启伪静态,然后将后台给出的规则粘贴在伪静态文件中,重启apache就行了
回复 支持 反对

使用道具 举报

15

主题

44

回帖

90

积分

渐入佳境

贡献
0 点
金币
28 个
 楼主| 发表于 2022-1-7 11:37:46 | 显示全部楼层
罗永浩 发表于 2022-1-7 02:23
先在后台开启伪静态,然后将后台给出的规则粘贴在伪静态文件中,重启apache就行了 ...

我想实现把t.jatxh.cn/index.php?mod=topic&code=2156跳转到www.jatxh.cn
不管t.jatxh.cn后面的目录啥全部跳转到www.jatxh.cn
回复 支持 反对

使用道具 举报

2

主题

1412

回帖

2043

积分

应用开发者

啦啦啦~

贡献
55 点
金币
320 个
发表于 2022-1-7 11:58:59 | 显示全部楼层
  1. <action type="Redirect" url="http://www.jatxh.cn/" redirectType="Permanent" />
复制代码
老周博客
本人不在任何渠道提供任何付费技术支持服务, 谨防上当受骗.
回复 支持 反对

使用道具 举报

15

主题

44

回帖

90

积分

渐入佳境

贡献
0 点
金币
28 个
 楼主| 发表于 2022-1-7 12:03:47 | 显示全部楼层

没用   刚试了下
回复 支持 反对

使用道具 举报

15

主题

44

回帖

90

积分

渐入佳境

贡献
0 点
金币
28 个
 楼主| 发表于 2022-1-8 17:57:48 | 显示全部楼层
有没有高手??
回复 支持 反对

使用道具 举报

56

主题

1455

回帖

3万

积分

管理员

贡献
2072 点
金币
1383 个
发表于 2022-1-9 22:44:34 | 显示全部楼层
<action type="Redirect" url="http://www.jatxh.cn/" redirectType="Permanent" />

上边说的这个是对的

  1. <rule name="t" stopProcessing="true">
  2.     <match url="^(.*)$" ignoreCase="false" />
  3.     <conditions logicalGrouping="MatchAll">
  4.         <add input="{HTTP_HOST}" pattern="^t.jatxh.cn$" />
  5.     </conditions>
  6.     <action type="Redirect" url="http://www.jatxh.cn/" redirectType="Permanent" />
  7. </rule>
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2024-4-24 01:44 , Processed in 0.039819 second(s), 6 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表