]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - includes/config-sample.php
Allow multiple short URLs for the same long URL. Fixes Issue 35.
[Github/YOURLS.git] / includes / config-sample.php
1 <?php\r
2 /*\r
3  ** MySQL settings - You can get this info from your web host\r
4  */\r
5 \r
6 /** MySQL database username */\r
7 define('YOURLS_DB_USER', 'dbuser');\r
8 \r
9 /** MySQL database password */\r
10 define('YOURLS_DB_PASS', 'dbpassword');\r
11 \r
12 /** The name of the database for YOURLS */\r
13 define('YOURLS_DB_NAME', 'yourls');\r
14 \r
15 /** MySQL hostname */\r
16 define('YOURLS_DB_HOST', 'localhost');\r
17 \r
18 /** MySQL tables prefix */\r
19 define('YOURLS_DB_PREFIX', 'yourls_');\r
20 \r
21 /** MySQL table name to store URLs. Don't change this if in doubt. */\r
22 /** NOTE: as of 1.4 this constant is deprecated and will be needed only if upgrading from an older version **/\r
23 define('YOURLS_DB_TABLE_URL', 'yourls_url');\r
24 \r
25 /** MySQL Next ID table name. Don't change this if in doubt. */\r
26 /** NOTE: as of 1.4 this constant is deprecated and will be needed only if upgrading from an older version\r
27  ** You can remove this if installing from scratch, or once properly upgraded **/\r
28 define('YOURLS_DB_TABLE_NEXTDEC', 'yourls_next_id');\r
29 \r
30 \r
31 /*\r
32  ** Site options\r
33  */\r
34 \r
35 /** YOURLS installation URL, no trailing slash */\r
36 define('YOURLS_SITE', 'http://site.com'); //\r
37 \r
38 /** Timezone GMT offset */\r
39 define('YOURLS_HOURS_OFFSET', 0); \r
40 \r
41 /** Allow multiple short URLs for a same long URL\r
42  ** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)\r
43  ** Set to false to allow multiple short URLs pointing to the same long URL (bit.ly behavior) */\r
44 define('YOURLS_UNIQUE_URLS', true);\r
45 \r
46 /** Private means protected with login/pass as defined below. Set to false for public usage. */\r
47 define('YOURLS_PRIVATE', true);\r
48 \r
49 /** A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: copy from http://yourls.org/cookiekey **/\r
50 define('YOURLS_COOKIEKEY', 'qQ4KhL_pu|s@Zm7n#%:b^{A[vhm');\r
51 \r
52 /**  Username(s) and password(s) allowed to access the site */\r
53 $yourls_user_passwords = array(\r
54         'username' => 'password',\r
55         'username2' => 'password2'      // You can have one or more 'login'=>'password' lines\r
56         );\r
57 \r
58 /*\r
59  ** URL Shortening settings\r
60  */\r
61 \r
62 /** URL shortening method: 36 or 62 */\r
63 define('YOURLS_URL_CONVERT', 36);\r
64 /*\r
65  * 36: generates case insentitive lowercase keywords (ie: 13jkm)\r
66  * 62: generate case sensitive keywords (ie: 13jKm or 13JKm)\r
67  * Stick to one setting, don't change after you've created links as it will change all your short URLs!\r
68  * Base 36 should be picked. Use 62 only if you understand what it implies.\r
69  * Using base 62 means you *need* PHP extension BCMath\r
70  */\r
71 \r
72 /** \r
73 * Reserved keywords (so that generated URLs won't match them)\r
74 * Define here negative, unwanted or potentially misleading keywords.\r
75 */\r
76 $yourls_reserved_URL = array(\r
77         'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick', 'gay',\r
78 );\r
79 \r
80 /*\r
81  ** Personal settings would go after here\r
82  */\r
83 \r
84 \r