comparison urlredirect.php.txt @ 468:6c999a7ac6d9

Delete trailing whitespace.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 01 Jul 2018 18:57:00 +0300
parents 30bb894cfb58
children
comparison
equal deleted inserted replaced
467:b29b0db02649 468:6c999a7ac6d9
8 * 1) Set up URLLog database (see urllog.tcl for more information) 8 * 1) Set up URLLog database (see urllog.tcl for more information)
9 * 9 *
10 * 2) In this example we assume that your short URL prefix is: 10 * 2) In this example we assume that your short URL prefix is:
11 * http://example.com/u/ 11 * http://example.com/u/
12 * This setting is called urllog_shorturl_prefix in urllog.tcl 12 * This setting is called urllog_shorturl_prefix in urllog.tcl
13 * 13 *
14 * 3) Place this PHP script under your www-server root. In this 14 * 3) Place this PHP script under your www-server root. In this
15 * example we will use "/var/www/urlredirect.php" that is 15 * example we will use "/var/www/urlredirect.php" that is
16 * visible as http://example.com/urlredirect.php 16 * visible as http://example.com/urlredirect.php
17 * 17 *
18 * Edit script dbFilename setting below to point to correct 18 * Edit script dbFilename setting below to point to correct
20 * 20 *
21 * 4) Create or edit /var/www/.htaccess and add following: 21 * 4) Create or edit /var/www/.htaccess and add following:
22 * RewriteEngine on 22 * RewriteEngine on
23 * RewriteRule ^u/([^\?\&]+)$ /urlredirect.php?u=$1 23 * RewriteRule ^u/([^\?\&]+)$ /urlredirect.php?u=$1
24 * 24 *
25 * 5) You may need to restart/reload your www-server. 25 * 5) You may need to restart/reload your www-server.
26 * 26 *
27 * 6) Profit. 27 * 6) Profit.
28 */ 28 */
29 try { 29 try {
30 // You need to uncomment and configure one of the PDO object 30 // You need to uncomment and configure one of the PDO object