Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 * cpl=1 등의 query string도 redirect하는 문제 수정
 * 사실 굳이 regex를 쓸 필요가 없는 부분이라서....
  • Loading branch information
textcube-dev committed Jun 1, 2008
1 parent 4760082 commit 561072b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$accessInfo['input'] = ltrim(substr($accessInfo['fullpath'],
strlen($accessInfo['root']) + (defined('__TEXTCUBE_NO_FANCY_URL__') ? 1 : 0)),'/');
// Support Tattertools 0.9x legacy address (for upgrade users)
if (preg_match("/pl=([0-9]+)/", $accessInfo['input'], $url)) { header("Location: ".$accessInfo['root']. $url[1]); exit;}
if (array_key_exists('pl', $_GET) && strval(intval($_GET['pl'])) == $_GET['pl']) { header("Location: ".$accessInfo['root'].$_GET['pl']); exit;}
$part = strtok($accessInfo['input'], '/');
if (in_array($part, array('image','plugins','script','cache','skin','style','attach','thumbnail'))) {
if (strpos($accessInfo['input'],'cache/backup') !== false) { require "lib/error.php";errorExit(404);}
Expand Down

0 comments on commit 561072b

Please sign in to comment.