From fa15f139ddd111acee9c2cd5514a5003b7533e4b Mon Sep 17 00:00:00 2001 From: ozhozh Date: Fri, 4 Sep 2009 20:39:31 +0000 Subject: [PATCH] - changed .htaccess with a rewrite rule for infos.php - upgrader recreates .htaccess git-svn-id: http://yourls.googlecode.com/svn/trunk@118 12232710-3e20-11de-b438-597f59cd7555 --- admin/upgrade.php | 1 + includes/functions-install.php | 1 + includes/functions-upgrade.php | 2 ++ 3 files changed, 4 insertions(+) diff --git a/admin/upgrade.php b/admin/upgrade.php index 1d076e0..3a72138 100644 --- a/admin/upgrade.php +++ b/admin/upgrade.php @@ -3,6 +3,7 @@ define( 'YOURLS_NO_VERSION_CHECK', true ); // Bypass version checking to prevent loop require_once( dirname(dirname(__FILE__)).'/includes/config.php' ); require_once( dirname(dirname(__FILE__)).'/includes/functions-upgrade.php' ); +require_once( dirname(dirname(__FILE__)).'/includes/functions-install.php' ); if (defined('YOURLS_PRIVATE') && YOURLS_PRIVATE == true) require_once( dirname(dirname(__FILE__)).'/includes/auth.php' ); diff --git a/includes/functions-install.php b/includes/functions-install.php index 6f040e7..41ed1c9 100644 --- a/includes/functions-install.php +++ b/includes/functions-install.php @@ -75,6 +75,7 @@ function yourls_create_htaccess() { 'RewriteCond %{REQUEST_FILENAME} !-f', 'RewriteCond %{REQUEST_FILENAME} !-d', 'RewriteRule ^([0-9A-Za-z]+)/?$ '.$path.'/yourls-go.php?id=$1 [L]', + 'RewriteRule ^([0-9A-Za-z]+)\+/?$ '.$path.'/yourls-info.php?id=$1 [L]', '', ); diff --git a/includes/functions-upgrade.php b/includes/functions-upgrade.php index 49faf2a..cf35671 100644 --- a/includes/functions-upgrade.php +++ b/includes/functions-upgrade.php @@ -16,8 +16,10 @@ function yourls_upgrade_to_14( $step ) { case 1: // create table log & table options // update table url structure + // update .htaccess yourls_create_tables_for_14(); yourls_alter_url_table_to_14(); + yourls_create_htaccess(); yourls_redirect_javascript( YOURLS_SITE."/admin/upgrade.php?step=2&oldver=1.3&newver=1.4&oldsql=100&newsql=200" ); break; -- 2.45.0