用QQ帐号登录应用中心QQ登录
Discuz! 应用中心

视频伪静态规则

如不知道自己使用的是哪种静态规则或不知道怎么添加,请咨询您的空间商。
也可以参考你的规则文件里的规则写法,使用对应的规则
如有错误,请联系QQ客服(不在线先留言,并先离线发送您的规则文件过来)。

添加规则后没生效,可尝试重启服务器。

Apache Web Server规则

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video\.html$ plugin.php?id=xlwsq_video
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_list_([0-9]+)\.html$ plugin.php?id=xlwsq_video&m=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_([0-9]+)\.html$ plugin.php?id=xlwsq_video&mod=view&sid=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_user\.html$ plugin.php?id=xlwsq_video:xlwsq_video_user
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_user_add\.html$ plugin.php?id=xlwsq_video:xlwsq_video_user&p=add
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_user_favorites\.html$ plugin.php?id=xlwsq_video:xlwsq_video_user&p=favorites
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_user_dsjl\.html$ plugin.php?id=xlwsq_video:xlwsq_video_user&p=dsjl
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_user_hsjl\.html$ plugin.php?id=xlwsq_video:xlwsq_video_user&p=hsjl


IIS Web Server规则 iis6   (添加之后,重启下IIS。)

RewriteRule ^(.*)/video\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video
RewriteRule ^(.*)/video_list_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video&m=$2
RewriteRule ^(.*)/video_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video&mod=view&sid=$2
RewriteRule ^(.*)/video_user\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video:xlwsq_video_user
RewriteRule ^(.*)/video_user_add\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video:xlwsq_video_user&p=add
RewriteRule ^(.*)/video_user_favorites\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video:xlwsq_video_user&p=favorites
RewriteRule ^(.*)/video_user_dsjl\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video:xlwsq_video_user&p=dsjl
RewriteRule ^(.*)/video_user_hsjl\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_video:xlwsq_video_user&p=hsjl


Nginx Web Server规则
rewrite ^([^\.]*)/video.html$ $1/plugin.php?id=xlwsq_video last;
rewrite ^([^\.]*)/video_list_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_video&m=$2 last;
rewrite ^([^\.]*)/video_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_video&mod=view&sid=$2 last;
rewrite ^([^\.]*)/video_user\.html$ $1/plugin.php?id=xlwsq_video:xlwsq_video_user last;
rewrite ^([^\.]*)/video_user_add\.html$ $1/plugin.php?id=xlwsq_video:xlwsq_video_user&p=add last;
rewrite ^([^\.]*)/video_user_favorites\.html$ $1/plugin.php?id=xlwsq_video:xlwsq_video_user&p=favorites last;
rewrite ^([^\.]*)/video_user_dsjl\.html$ $1/plugin.php?id=xlwsq_video:xlwsq_video_user&p=dsjl last;
rewrite ^([^\.]*)/video_user_hsjl\.html$ $1/plugin.php?id=xlwsq_video:xlwsq_video_user&p=hsjl last;



IIS7规则  (添加后,重启下IIS)
<rule name=\"xlwsqvideo1\">
<match url=\"^(.*/)*video.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video\" />
</rule>
<rule name=\"xlwsqvideo2\">
<match url=\"^(.*/)*video_list_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video&amp;m={R:2}\" />
</rule>
<rule name=\"xlwsqvideo3\">
<match url=\"^(.*/)*video_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video&amp;mod=view&amp;sid={R:2}\" />
</rule>
<rule name=\"xlwsqvideo4\">
<match url=\"^(.*/)*video_user.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video:xlwsq_video_user\" />
</rule>
<rule name=\"xlwsqvideo5\">
<match url=\"^(.*/)*video_user_add.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video:xlwsq_video_user&amp;p=add\" />
</rule>
<rule name=\"xlwsqvideo6\">
<match url=\"^(.*/)*video_user_favorites.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video:xlwsq_video_user&amp;p=favorites\" />
</rule>
<rule name=\"xlwsqvideo7\">
<match url=\"^(.*/)*video_user_dsjl.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video:xlwsq_video_user&amp;p=dsjl\" />
</rule>
<rule name=\"xlwsqvideo8\">
<match url=\"^(.*/)*video_user_hsjl.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_video:xlwsq_video_user&amp;p=hsjl\" />
</rule>


如修改默认伪静态规则名(video),以下静态链接里的 video也要进行相应修改。(等号右边动态xlwsq_video不要改动)
例子:(把video改为 shipin)
原句:RewriteRule ^video\.html$ plugin.php?id=xlwsq_video
改后:RewriteRule ^shipin\.html$ plugin.php?id=xlwsq_video

修改的名称,请勿和其它规则名称冲突。

Discuz交流社区 | Discuz程序下载 | Discuz使用教程 | 我是Discuz开发者

Copyright ©2021Dismall.comAll Rights Reserved. 皖ICP备16010102号-4 增值电信业务经营许可证:皖B2-20200047

违法网站请勿向我司工作人员及应用开发者发起任何形式的服务请求,严禁使用Discuz!应用中心提供的应用从事任何非法活动

返回顶部