From b69a01235dfca271d3efab0a510d4a5c074d035d Mon Sep 17 00:00:00 2001 From: ozhozh Date: Mon, 14 Jun 2010 19:20:32 +0000 Subject: [PATCH] Support for Prefix-n-Shorten (site.com/http://example.com/) git-svn-id: http://yourls.googlecode.com/svn/trunk@398 12232710-3e20-11de-b438-597f59cd7555 --- changelog.txt | 5 +++-- yourls-loader.php | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 0378b1d..2c34a1e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -53,9 +53,10 @@ list, simply refer to the commit messages: http://code.google.com/p/yourls/sourc - improve error reporting with API method url-stat 1.5 -- added: plugin architecture! OMG plugins! +- added: plugin architecture! OMG plugins!!1 - added directory /user, config.php can be moved there -- added new instant bookmarklets +- added new "instant bookmarklets" - added 1 click copy to clipboard a la bitly - change in logic: now all request are handled by PHP and don't rely on .htaccess +- added support for prefix-n-shorten: site.com/http://example.com/ - working on: maintenance mode \ No newline at end of file diff --git a/yourls-loader.php b/yourls-loader.php index be0e05b..16e07c8 100644 --- a/yourls-loader.php +++ b/yourls-loader.php @@ -37,14 +37,13 @@ exit; } -/** Check this on Linux. Cannot run on Windows, see https://issues.apache.org/bugzilla/show_bug.cgi?id=41441 // Bookmarklet: -if( preg_match( "@^[a-zA-Z]://.+@", $request, $matches ) ) { +if( preg_match( "@^[a-zA-Z]+://.+@", $request, $matches ) ) { $url = $matches[0]; yourls_redirect( yourls_admin_url('index.php').'?u='.rawurlencode( $url ) ); exit; } -/**/ + // Past this point this is a request the loader could not understand yourls_do_action( 'loader_failed', $request ); -- 2.45.0