-
Notifications
You must be signed in to change notification settings - Fork 198
/
index.config.php
58 lines (49 loc) · 1.83 KB
/
index.config.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
<?php
/**
* ProcessWire multi-domain configuration file (optional)
*
* If used, this file should be copied/moved to the ProcessWire installation root directory.
*
* ProcessWire 2.x
* Copyright (C) 2015 by Ryan Cramer
* This file licensed under Mozilla Public License v2.0 http://mozilla.org/MPL/2.0/
*
* https://processwire.com
*
*/
if(!defined("PROCESSWIRE")) die();
/**
* Multi-domain configuration: Optionally define alternate /site/ dirs according to host
*
* If used, this file should be placed in your web root and then edited as follows.
*
* This function returns an array that should be in the format where the array key
* is the hostname (including domain) and the value is the /site/ directory you want to use.
* This value must start with 'site-', i.e. 'site-domain' or 'site-something'. This is to
* ensure that ProcessWire's htaccess file can recognize and protect files in that directory.
*
* Note that if your site may be accessed at either domain.com OR www.domain.com, then you'll
* want to include entries for both, pointing to the same /site-domain/ directory.
*
* Each /site/ dir has it's own /site/config.php file that should be pointing to a separate
* database. You shouldn't have two different /site/ dirs sharing the same database.
*
*/
function ProcessWireHostSiteConfig() {
return array(
/*
* Some Examples (you should remove/replace them if used).
* Just note that the values must begin with 'site-'.
*
*/
'mydomain.com' => 'site-mydomain',
'www.mydomain.com' => 'site-mydomain',
'dev.mydomain.com' => 'site-dev',
'www.otherdomain.com' => 'site-other',
/*
* Default for all others (typically /site/)
*
*/
'*' => 'site',
);
}