本教程地址 https://addon.dismall.com/plugins/jzsjiale_daogou.shiyongshouce.html
一、关于插件导购模块推荐帖子伪静态设置的相关说明
首先请懂得人使用,不解释!!
开启插件导购模块推荐帖子伪静态,请务必前往 dz后台->全局->seo设置->URL 静态化,将\"论坛主题内容页\"开启并将格式设置与导购参数中“帖子伪静态规则设置”保持一致,否则无法使用。
1、不启用独立详情页,链接到discuz自带帖子页面,伪静态规则设置为discuz默认的\"thread-{tid}-{page}-{prevpage}.html\"
http://ww2.sinaimg.cn/large/006HJ39wgy1ffqncbgx0pj31kw0rtwq7.jpg
nginx伪静态配置示例代码,仅供参考,其他服务器软件,请自行设置规则!
location / {
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
if (!-e $request_filename) {
return 404;
}
}
2、启用插件自带独立的内容详情页展示,需前往插件导购参数中开启“开启独立详情页”功能,并将伪静态规则设置为\"独立详情页:*****.html\"相关规则,仅适用于导购模板v2。
如果想让dz自带论坛帖子点击也跳转独立详情页,如下图设置,将标注区域内容,改成和上面选择的规则内容一致即可,如果不想要这样可以直接跳过此步骤!
http://i1.piimg.com/588926/d16d55cd19add482.png
nginx伪静态配置示例代码,仅供参考,其他服务器软件,请自行设置规则!
location / {
rewrite ^([^\.]*)/topic-([0-9]+)\.html$ $1/plugin.php?id=jzsjiale_daogou:article&tid=$2 last;
if (!-e $request_filename) {
return 404;
}
}
如果想让论坛自带版块列表页帖子也链接到插件独立详情页,那么可以尝试将,dz后台->全局->seo设置->URL 静态化,将\"论坛主题内容页\"开启并将格式设置为 \"topic-{tid}.html\"
三、关于插件导购首页、发现、好物独立模块使用伪静态功能的相关说明
首先请懂得人使用,不解释!!
开启插件“独立模块启用伪静态”功能,请务必前往 dz后台->界面->导航设置,对导购首页、发现、好物、写文章模块的链接做如下调整,本功能务必按照本文件教程配置,否则无法使用!!
【导购版 2.5.6】及以后的版本将会随导购参数里面的“开启独立模块伪静态”开关改变而自动改变dz导航相关链接设置。
伪静态导购链接设置对应关系:
导购首页:index.html
发现:faxian.html
好物:haowu.html
搜券:souquan.html
写文章:xiewenzhang.html
//-------以下的不用在导航设置里面更改------
用户跳转页面: user.html
手机版商品分类:spcate.html
手机版商品分类详情页:spdetial.html
//-------以上的不用在导航设置里面更改------
然后前往服务器做伪静态配置:
nginx伪静态配置示例代码,仅供参考,其他服务器软件,请自行设置规则!
location / {
rewrite ^([^\.]*)/index.html$ $1/plugin.php?id=jzsjiale_daogou:daogou last;
rewrite ^([^\.]*)/faxian.html$ $1/plugin.php?id=jzsjiale_daogou:faxian last;
rewrite ^([^\.]*)/haowu.html$ $1/plugin.php?id=jzsjiale_daogou:haowu last;
rewrite ^([^\.]*)/souquan.html$ $1/plugin.php?id=jzsjiale_daogou:souquan last;
rewrite ^([^\.]*)/xiewenzhang.html$ $1/plugin.php?id=jzsjiale_daogou:xiewenzhang last;
rewrite ^([^\.]*)/spcate.html$ $1/plugin.php?id=jzsjiale_daogou:spcate last;
rewrite ^([^\.]*)/spdetial.html$ $1/plugin.php?id=jzsjiale_daogou:spdetial last;
rewrite ^([^\.]*)/user.html$ $1/plugin.php?id=jzsjiale_daogou:user last;
if (!-e $request_filename) {
return 404;
}
}
非伪静态导购链接设置对应关系:
导购首页:plugin.php?id=jzsjiale_daogou:daogou
发现:plugin.php?id=jzsjiale_daogou:faxian
好物:plugin.php?id=jzsjiale_daogou:haowu
搜券:plugin.php?id=jzsjiale_daogou:souquan
写文章:plugin.php?id=jzsjiale_daogou:xiewenzhang
//-------以下的不用在导航设置里面更改------
用户跳转页面: plugin.php?id=jzsjiale_daogou:user
手机版商品分类:plugin.php?id=jzsjiale_daogou:spcate
手机版商品分类详情页:plugin.php?id=jzsjiale_daogou:spdetial
//-------以上的不用在导航设置里面更改------
//-------以下的是nginx完整伪静态规则------
location / {
rewrite ^([^\.]*)/index.html$ $1/plugin.php?id=jzsjiale_daogou:daogou last;
rewrite ^([^\.]*)/faxian.html$ $1/plugin.php?id=jzsjiale_daogou:faxian last;
rewrite ^([^\.]*)/haowu.html$ $1/plugin.php?id=jzsjiale_daogou:haowu last;
rewrite ^([^\.]*)/souquan.html$ $1/plugin.php?id=jzsjiale_daogou:souquan last;
rewrite ^([^\.]*)/xiewenzhang.html$ $1/plugin.php?id=jzsjiale_daogou:xiewenzhang last;
rewrite ^([^\.]*)/spcate.html$ $1/plugin.php?id=jzsjiale_daogou:spcate last;
rewrite ^([^\.]*)/spdetial.html$ $1/plugin.php?id=jzsjiale_daogou:spdetial last;
rewrite ^([^\.]*)/user.html$ $1/plugin.php?id=jzsjiale_daogou:user last;
rewrite ^([^\.]*)/topic-([0-9]+)\.html$ $1/plugin.php?id=jzsjiale_daogou:article&tid=$2 last;
if (!-e $request_filename) {
return 404;
}
}
//-------以上的是nginx完整伪静态规则------
//-------以下的是iis 7.5伪静态规则------
<rule name=\"daogou_index\">
<match url=\"^(.*/)*index.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:daogou&{R:2}\" />
</rule>
<rule name=\"daogou_faxian\">
<match url=\"^(.*/)*faxian.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:faxian&{R:2}\" />
</rule>
<rule name=\"daogou_haowu\">
<match url=\"^(.*/)*haowu.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:haowu&{R:2}\" />
</rule>
<rule name=\"daogou_souquan\">
<match url=\"^(.*/)*souquan.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:souquan&{R:2}\" />
</rule>
<rule name=\"daogou_xiewenzhang\">
<match url=\"^(.*/)*xiewenzhang.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:xiewenzhang&{R:2}\" />
</rule>
<rule name=\"daogou_spcate\">
<match url=\"^(.*/)*spcate.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:spcate&{R:2}\" />
</rule>
<rule name=\"daogou_spdetial\">
<match url=\"^(.*/)*spdetial.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:spdetial&{R:2}\" />
</rule>
<rule name=\"daogou_user\">
<match url=\"^(.*/)*user.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:user&{R:2}\" />
</rule>
<rule name=\"daogou_post\">
<match url=\"^(.*/)*post_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:article&tid={R:2}&{R:3}\" />
</rule>
注意:对于index.html这种规则,如果存在其他页面也包含index.html,例如:www.xxx.com/about/index.html,那么需要自行修改规则,排除about,例如规则改为:
<rule name=\"daogou_index\">
<match url=\"^(.*/!about)*index.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=jzsjiale_daogou:daogou&{R:2}\" />
</rule>
具体请根据自己网站情况,自行修改规则!
//-------以上的是iis 7.5伪静态规则------
//-------以下的是iis6伪静态规则------
RewriteRule ^(.*)/index\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:daogou&$2
RewriteRule ^(.*)/faxian\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:faxian&$2
RewriteRule ^(.*)/haowu\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:haowu&$2&$3
RewriteRule ^(.*)/souquan\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:souquan&$2&$3
RewriteRule ^(.*)/xiewenzhang\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:xiewenzhang&$2
RewriteRule ^(.*)/spcate\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:spcate&$2
RewriteRule ^(.*)/spdetial\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:spdetial&$2&$3
RewriteRule ^(.*)/user\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:user&$2
RewriteRule ^(.*)/post_([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=jzsjiale_daogou:article&tid=$2&$3
//-------以上的是iis6伪静态规则------
//-------以下的是Apache Web Server(独立主机用户)伪静态规则------
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/index\.html$ $1/plugin.php?id=jzsjiale_daogou:daogou&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/faxian\.html$ $1/plugin.php?id=jzsjiale_daogou:faxian&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/haowu\.html$ $1/plugin.php?id=jzsjiale_daogou:haowu&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/souquan\.html$ $1/plugin.php?id=jzsjiale_daogou:souquan&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/xiewenzhang\.html$ $1/plugin.php?id=jzsjiale_daogou:xiewenzhang&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/spcate\.html$ $1/plugin.php?id=jzsjiale_daogou:spcate&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/spdetial\.html$ $1/plugin.php?id=jzsjiale_daogou:spdetial&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/user\.html$ $1/plugin.php?id=jzsjiale_daogou:user&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/post_([0-9]+)\.html$ $1/plugin.php?id=jzsjiale_daogou:article&tid=$2&%1
将内容放到.htaccess中合适位置
//-------以上的是Apache Web Server(独立主机用户)伪静态规则------
//-------以下的是Apache Web Server(虚拟主机用户)伪静态规则------
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^index\.html$ plugin.php?id=jzsjiale_daogou:daogou&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^faxian\.html$ plugin.php?id=jzsjiale_daogou:faxian&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^haowu\.html$ plugin.php?id=jzsjiale_daogou:haowu&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^souquan\.html$ plugin.php?id=jzsjiale_daogou:souquan&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^xiewenzhang\.html$ plugin.php?id=jzsjiale_daogou:xiewenzhang&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^spcate\.html$ plugin.php?id=jzsjiale_daogou:spcate&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^spdetial\.html$ plugin.php?id=jzsjiale_daogou:spdetial&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^user\.html$ plugin.php?id=jzsjiale_daogou:user&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^post_([0-9]+)\.html$ plugin.php?id=jzsjiale_daogou:article&tid=$1&%1
将内容放到.htaccess中合适位置
//-------以上的是Apache Web Server(虚拟主机用户)伪静态规则------