forked from e107inc/vstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
e_url.php
98 lines (67 loc) · 2.14 KB
/
e_url.php
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/*
* e107 Bootstrap CMS
*
* Copyright (C) 2008-2014 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*/
if (!defined('e107_INIT')) { exit; }
// v2.x Standard - Simple mod-rewrite module.
class vstore_url // plugin-folder + '_url'
{
function config()
{
$config = array();
$config['cancel'] = array(
'regex' => '^vstore/checkout/cancel/?$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?mode=cancel',
'sef' => 'vstore/checkout/cancel/',
);
$config['return'] = array(
'regex' => '^vstore/checkout/return/?\??(.*)$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?mode=return&$1',
'sef' => 'vstore/checkout/return/',
);
$config['checkout'] = array(
'regex' => '^vstore/checkout/?$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?mode=checkout',
'sef' => 'vstore/checkout/',
);
$config['addtocart'] = array(
'regex' => '^vstore/cart/add/([\d]*)$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?mode=cart&add=$1',
'sef' => 'vstore/cart/add/{item_id}',
);
$config['cart'] = array(
'regex' => '^vstore/cart/?\??(.*)$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?mode=cart&$1',
'sef' => 'vstore/cart/',
);
$config['index'] = array(
'alias' => 'vstore',
'regex' => '^{alias}\/?([\?].*)?\/?$',
'sef' => '{alias}/',
'redirect' => '{e_PLUGIN}vstore/vstore.php$1',
);
$config['subcategory'] = array(
'alias' => 'vstore',
'regex' => '^{alias}/([^\/]*)/([^\/]*)/?$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?catsef=$2',
'sef' => '{alias}/{cat_sef}/{subcat_sef}'
);
$config['category'] = array(
'alias' => 'vstore',
'regex' => '^{alias}/([^\/]*)/?$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?catsef=$1',
'sef' => '{alias}/{cat_sef}'
);
$config['product'] = array(
'alias' => 'vstore',
'regex' => '^{alias}/([^\/]*)/([\d]*)/(.*)',
'sef' => '{alias}/{cat_sef}/{item_id}/{item_sef}',
'redirect' => '{e_PLUGIN}vstore/vstore.php?item=$2',
);
return $config;
}
}