73 lines
3.7 KiB
PHP
73 lines
3.7 KiB
PHP
<?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>';
|
|
?>
|