/
e_url.php
50 lines (41 loc) · 993 Bytes
/
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
<?php
/**
* @file
* Simple mod-rewrite module.
*/
if(!defined('e107_INIT'))
{
exit;
}
/**
* Class alexa_url.
*/
class alexa_url
{
/**
* Provides information about mod-rewrite rules.
*
* @return array $config
*/
function config()
{
$config = array();
// Alexa endpoint, with query parameters.
$config['endpoint/?'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^alexa/endpoint/?\?(.*)$',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}alexa/endpoint.php?$1',
);
// Alexa endpoint.
$config['endpoint'] = array(
// Matched against url, and if true, redirected to 'redirect' below.
'regex' => '^alexa/endpoint/?(.*)$',
// Used by e107::url(); to create a url from the db table.
'sef' => 'alexa/endpoint$',
// File-path of what to load when the regex returns true.
'redirect' => '{e_PLUGIN}alexa/endpoint.php',
);
return $config;
}
}