admin 发表于 2024-2-23 10:14:25

[柒瑞]小视频伪静态短域名[柒瑞]小视频URL伪静态规则

温馨提示

请先安装主应用:[柒瑞]小视频
及其组件:短域名URL伪静态
并需要在discuz后台[柒瑞]小视频的设定中开启伪静态域名才可生效

Apache Web Server(独立主机用户)

<IfModule mod_rewrite.c>
RewriteEngine On
########## x7ree_v URL rewite RULE 202112 begin
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/video$ $1/plugin.php?id=x7ree_v:x7ree_v&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/vfenlei_(+)$ $1/plugin.php?id=x7ree_v:x7ree_v&fenlei=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/video_(+)$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=1&id_7ree=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/myvideo$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/vshare$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/vadmin$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=4&%1
########## x7ree_v URL rewite RULE 202112 end
</IfModule>


Apache Web Server(虚拟主机用户)

RewriteEngine On
########## x7ree_v URL rewite RULE 202112 begin
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video$ plugin.php?id=x7ree_v:x7ree_v&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^vfenlei_(+)$ plugin.php?id=x7ree_v:x7ree_v&fenlei=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^video_(+)$ plugin.php?id=x7ree_v:x7ree_v&code_7ree=1&id_7ree=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^myvideo$ plugin.php?id=x7ree_v:x7ree_v&code_7ree=3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^vshare$ plugin.php?id=x7ree_v:x7ree_v&code_7ree=2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^vadmin$ plugin.php?id=x7ree_v:x7ree_v&code_7ree=4&%1
########## x7ree_v URL rewite RULE 202112 end


IIS Web Server(独立主机用户)

稍后完善,请先咨询客服QQ获取规则详情;



IIS7 Web Server(独立主机用户)

稍后完善,请先咨询客服QQ获取规则详情;



Zeus Web Server

稍后完善,请先咨询客服QQ获取规则详情;



Nginx Web Server

rewrite ^([^.]*)/video$ $1/plugin.php?id=x7ree_v:x7ree_v last;
rewrite ^([^.]*)/vfenlei_(+)$ $1/plugin.php?id=x7ree_v:x7ree_v&fenlei=$2 last;
rewrite ^([^.]*)/video_(+)$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=1&id_7ree=$2 last;
rewrite ^([^.]*)/myvideo$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=3 last;
rewrite ^([^.]*)/vshare$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=2 last;
rewrite ^([^.]*)/vadmin$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=4 last;

if (!-e $request_filename) {
      return 404;
}

机器人GPT-AI 发表于 2024-2-23 10:14:46

这段代码是用于实现小视频URL伪静态的规则。根据不同的Web服务器,有对应的配置代码。

对于Apache Web Server(独立主机用户)和Apache Web Server(虚拟主机用户):

1. 在你的主机的.htaccess文件中添加以下代码:
RewriteEngine On
########## x7ree_v URL rewite RULE 202112 begin
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/video$ $1/plugin.php?id=x7ree_v:x7ree_v&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/vfenlei_(.+)$ $1/plugin.php?id=x7ree_v:x7ree_v&fenlei=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/video_(.+)$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=1&id_7ree=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/myvideo$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/vshare$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/vadmin$ $1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=4&%1
########## x7ree_v URL rewite RULE 202112 end

对于Nginx Web服务器:

1. 在你的Nginx配置文件中的`server`块中添加以下代码:
rewrite ^/(.*)/video$ /$1/plugin.php?id=x7ree_v:x7ree_v last;
rewrite ^/(.*)/vfenlei_(.+)$ /$1/plugin.php?id=x7ree_v:x7ree_v&fenlei=$2 last;
rewrite ^/(.*)/video_(.+)$ /$1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=1&id_7ree=$2 last;
rewrite ^/(.*)/myvideo$ /$1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=3 last;
rewrite ^/(.*)/vshare$ /$1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=2 last;
rewrite ^/(.*)/vadmin$ /$1/plugin.php?id=x7ree_v:x7ree_v&code_7ree=4 last;

if (!-e $request_filename) {
    return 404;
}

请注意,这些代码可能需要根据你的具体环境进行适当的调整。另外,如果你使用的是其他Web服务器,可以向我提供更多信息,我将尽力提供相应的配置代码。
-- 来源:OpenAI ****GPT
页: [1]
查看完整版本: [柒瑞]小视频伪静态短域名[柒瑞]小视频URL伪静态规则

创宇盾启航版免费网站防御网站加速服务