discuz相册伪静态(DISCUZ 配置伪静态 教程大全)

大家好,张承辉来为大家解答以上问题。discuz相册伪静态,DISCUZ 配置伪静态 教程大全很多人还不知道,现在让我们一起来看看吧!

1、 ApacheWebServer(独立主机用户)

2、 IfModulemod_rewrite.c

3、 重写引擎

4、 RewriteCond%{QUERY_STRING}^(.*)$

5、 RewriteRule^(.*)/话题-(。).html$$1/portal.php?mod=topictopic=$2%1

6、 RewriteCond%{QUERY_STRING}^(.*)$

7、 RewriteRule^(.*)/论坛-(w )-([0-9]).html$$1/forum.php?mod=forumsplayfid=$2page=$3%1

8、 RewriteCond%{QUERY_STRING}^(.*)$

9、 RewriteRule^(.*)/thread-([0-9])-([0-9])-([0-9]).html$$1/forum.php?mod=viewthreadtid=$ 2 extra=page %

10、 3D美元页面=$3%1

11、 RewriteCond%{QUERY_STRING}^(.*)$

12、 RewriteRule^(.*)/group-([0-9] )-([0-9]).html$$1/forum.php?mod=groupfid=$2page=$3%1

13、 RewriteCond%{QUERY_STRING}^(.*)$

14、 RewriteRule^(.*)/space-(用户名|uid)-(.).html$$1/home.php?mod=space$2=$3%1

15、 RewriteCond%{QUERY_STRING}^(.*)$

16、 RewriteRule^(.*)/(fid|tid)-([0-9]).html$$1/index.php?动作=$ 2值=$3%1

17、 /IfModule

18、 如果没有安装mod_Rewrite,您可以重新编译阿帕奇人,并在原有配置的内容中加入- enable-Rewrite=shared,然后再在街头流氓配置文件中加入上述代码即可。

19、 ApacheWebServer(独立主机用户)

20、 IfModulemod_rewrite.c

21、 重写引擎

22、 RewriteCond%{QUERY_STRING}^(.*)$

23、 RewriteRule^(.*)/话题-(。).html$$1/portal.php?mod=topictopic=$2%1

24、 RewriteCond%{QUERY_STRING}^(.*)$

25、 RewriteRule^(.*)/论坛-(w )-([0-9]).html$$1/forum.php?mod=forumsplayfid=$2page=$3%1

26、 RewriteCond%{QUERY_STRING}^(.*)$

27、 RewriteRule^(.*)/thread-([0-9])-([0-9])-([0-9]).html$$1/forum.php?mod=viewthreadtid=$ 2 extra=page %

28、 3D美元页面=$3%1

29、 RewriteCond%{QUERY_STRING}^(.*)$

30、 RewriteRule^(.*)/group-([0-9] )-([0-9]).html$$1/forum.php?mod=groupfid=$2page=$3%1

31、 RewriteCond%{QUERY_STRING}^(.*)$

32、 RewriteRule^(.*)/space-(用户名|uid)-(.).html$$1/home.php?mod=space$2=$3%1

33、 RewriteCond%{QUERY_STRING}^(.*)$

34、 RewriteRule^(.*)/(fid|tid)-([0-9]).html$$1/index.php?动作=$ 2值=$3%1

35、 /IfModule

36、 如果没有安装mod_Rewrite,您可以重新编译阿帕奇人,并在原有配置的内容中加入- enable-Rewrite=shared,然后再在街头流氓配置文件中加入上述代码即可。

37、 IISWebServer(独立主机用户)说明:IIS下的重写需要添加组件,通过筛选器的方式实现,下面是组件的下载与配置方法:IISRewrite

38、IIS7WebServer(独立主机用户)可以将如下的配置规则加入到web.config中

39、<rewrite>

40、<rules>

41、<rulename=”portal_topic”>

42、<matchurl=”^(.*/)*topic-(.+).html?*(.*)$”/>

43、<actiontype=”Rewrite”url=”{R:1}/portal.php?mod=topic&amp;topic={R:2}&amp;{R:3}”/>

44、</rule>

45、<rulename=”forum_forumsplay”>

46、<matchurl=”^(.*/)*forum-(w+)-([0-9]+).html?*(.*)$”/>

47、<actiontype=”Rewrite”url=”{R:1}/forum.php?mod=forumdisplay&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}”/>

48、</rule>

49、<rulename=”forum_viewthread”>

50、<matchurl=”^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html?*(.*)$”/>

51、<actiontype=”Rewrite”url=”{R:1}/forum.php?mod=viewthread&amp;tid={R:2}&amp;extra=page%3D{R:4}&amp;page={R:3}&amp;{R:5}”/>

52、</rule>

53、<rulename=”group_group”>

54、<matchurl=”^(.*/)*group-([0-9]+)-([0-9]+).html?*(.*)$”/>

55、<actiontype=”Rewrite”url=”{R:1}/forum.php?mod=group&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}”/>

56、</rule>

57、<rulename=”home_space”>

58、<matchurl=”^(.*/)*space-(username|uid)-(.+).html?*(.*)$”/>

59、<actiontype=”Rewrite”url=”{R:1}/home.php?mod=space&amp;{R:2}={R:3}&amp;{R:4}”/>

60、</rule>

61、<rulename=”forum_archiver”>

62、<matchurl=”^(.*/)*(fid|tid)-([0-9]+).html?*(.*)$”/>

63、<actiontype=”Rewrite”url=”{R:1}/index.php?action={R:2}&amp;value={R:3}&amp;{R:4}”/>

64、</rule>

65、</rules>

66、</rewrite>

67、ZeusWebServer配置规则如下:

68、matchURLinto$with^(.*)/topic-(.+).html?*(.*)$

69、ifmatchedthen

70、setURL=$1/portal.php?mod=topic&topic=$2&$3

71、enf

72、matchURLinto$with^(.*)/forum-(w+)-([0-9]+).html?*(.*)$

73、ifmatchedthen

74、setURL=$1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4

75、endif

76、matchURLinto$with^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html?*(.*)$

77、ifmatchedthen

78、setURL=$1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3&$5

79、endif

80、matchURLinto$with^(.*)/group-([0-9]+)-([0-9]+).html?*(.*)$

81、ifmatchedthen

82、setURL=$1/forum.php?mod=group&fid=$2&page=$3&$4

83、endif

84、matchURLinto$with^(.*)/space-(username|uid)-(.+).html?*(.*)$

85、ifmatchedthen

86、setURL=$1/home.php?mod=space&$2=$3&$4

87、endif

88、matchURLinto$with^(.*)/(fid|tid)-([0-9]+).html?*(.*)$

89、ifmatchedthen

90、setURL=$1/index.php?action=$2&value=$3&$4

91、endif

92、NginxWebServer配置规则如下:

93、rewrite^([^.]*)/topic-(.+).html$$1/portal.php?mod=topic&topic=$2last;

94、rewrite^([^.]*)/forum-(w+)-([0-9]+).html$$1/forum.php?mod=forumdisplay&fid=$2&page=$3last;

95、rewrite^([^.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$$1/forum.php?mod=viewthread&tid=$2&extra=page%

96、3D$4&page=$3last;

97、rewrite^([^.]*)/group-([0-9]+)-([0-9]+).html$$1/forum.php?mod=group&fid=$2&page=$3last;

98、rewrite^([^.]*)/space-(username|uid)-(.+).html$$1/home.php?mod=space&$2=$3last;

99、rewrite^([^.]*)/(fid|tid)-([0-9]+).html$$1/index.php?action=$2&value=$3last;

100、if(!-e$request_filename){

101、return404;

102、}

103、教程到此结束!

本文到此结束,希望对大家有所帮助。

(0)
上一篇 2022年7月11日
下一篇 2022年7月11日

相关推荐