admincp_rewrite.inc.php
3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* DZAPP Haodai URL Rewrite Settings
*
* @copyright (c) 2013 DZAPP. (http://www.dzapp.cn)
* @author BranchZero <branchzero@gmail.com>
*/
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
echo '<h1>'.lang('plugin/dzapp_haodai','rewrite_intro_title').'</h1>
<pre class="colorbox">
'.lang('plugin/dzapp_haodai','rewrite_intro_info').'
</pre>
<h1>Apache</h1>
<pre class="colorbox">
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^haodai\.html$ plugin.php?id=dzapp_haodai&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^haodai-calculator-([a-z]+)\.html$ plugin.php?id=dzapp_haodai&action=calc&type=$1&%2
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^haodai-(view|apply)-([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+)\.html$ plugin.php?id=dzapp_haodai&action=$1&xd_id=$2&xd_type=$3&month=$4&money=$5&%6
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^haodai-list-([a-z]+)-([0-9]+)\.html$ plugin.php?id=dzapp_haodai&action=list&type=$1&page=$2&%3
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^haodai-news-([0-9]+)\.html$ plugin.php?id=dzapp_haodai&action=news&aid=$1&%2
</pre>
<h1>IIS6</h1>
<pre class="colorbox">
RewriteRule ^(.*)/haodai\.html(\?(.*))*$ $1/plugin\.php\?id=dzapp_haodai&$3
RewriteRule ^(.*)/haodai-calculator-([a-z]+)\.html(\?(.*))*$ $1/plugin\.php\?id=dzapp_haodai&action=calc&type=$2&$4
RewriteRule ^(.*)/haodai-(view|apply)-([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=dzapp_haodai&action=$2&xd_id=$3&xd_type=$4&month=$5&money=$6&$8
RewriteRule ^(.*)/haodai-list-([a-z]+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=dzapp_haodai&action=list&type=$2&page=$3&$5
RewriteRule ^(.*)/haodai-news-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=dzapp_haodai&action=news&aid=$2&$4
</pre>
<h1>IIS7</h1>
<pre class="colorbox">
<rewrite>
<rules>
<rule name="haodai">
<match url="^(.*/)*haodai.html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/plugin.php\?id=dzapp_haodai&{R:2}" />
</rule>
<rule name="haodai_calculator">
<match url="^(.*/)*haodai-calculator-([a-z]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/plugin.php\?id=dzapp_haodai&action=calc&type={R:2}&{R:3}" />
</rule>
<rule name="haodai_view_apply">
<match url="^(.*/)*haodai-(view|apply)-([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/plugin.php\?id=dzapp_haodai&action={R:2}&xd_id={R:3}&xd_type={R:4}&month={R:5}&money={R:6}&{R:7}" />
</rule>
<rule name="haodai_list">
<match url="^(.*/)*haodai-list-([a-z]+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/plugin.php\?id=dzapp_haodai&action=list&type={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="haodai_news">
<match url="^(.*/)*haodai-news-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/plugin.php\?id=dzapp_haodai&action=news&aid={R:2}&{R:3}" />
</rule>
</rules>
</rewrite>
</pre>
<h1>Nginx</h1>
<pre class="colorbox">
rewrite ^([^\.]*)/haodai\.html$ $1/plugin.php?id=dzapp_haodai last;
rewrite ^([^\.]*)/haodai-calculator-([a-z]+)\.html$ $1/plugin.php?id=dzapp_haodai&action=calc&type=$2 last;
rewrite ^([^\.]*)/haodai-(view|apply)-([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=dzapp_haodai&action=$2&xd_id=$3&xd_type=$4&month=$5&money=$6 last;
rewrite ^([^\.]*)/haodai-list-([a-z]+)-([0-9]+)\.html$ $1/plugin.php?id=dzapp_haodai&action=list&type=$2&page=$3 last;
rewrite ^([^\.]*)/haodai-news-([0-9]+)\.html$ $1/plugin.php?id=dzapp_haodai&action=news&aid=$2 last;
</pre>';
?>