Changeset 807 for trunk/Modules/Redirection/Redirection.php
- Timestamp:
- May 25, 2014, 12:33:20 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Redirection/Redirection.php
r800 r807 17 17 function Start() 18 18 { 19 $this->System->RegisterPage('team.php', 'PageRedirection'); 20 $this->System->RegisterPage('version.php', 'PageRedirection'); 21 $this->System->RegisterPage('phpBB3', 'PageRedirection'); 22 $this->System->RegisterPage('phpbb3', 'PageRedirection'); 23 $this->System->RegisterPage(array('forum', 'index.php'), 'PageRedirection'); 24 $this->System->RegisterPage('statistic.php', 'PageRedirection'); 25 $this->System->RegisterPage('register.php', 'PageRedirection'); 26 $this->System->RegisterPage('dictionary.php', 'PageRedirection'); 27 $this->System->RegisterPage(array('dictionary', 'user.php'), 'PageRedirection'); 28 $this->System->RegisterPage(array('team', 'userlist.php'), 'PageRedirection'); 29 $this->System->RegisterPage('download-addon.php', 'PageRedirection'); 30 $this->System->RegisterPage('banners.php', 'PageRedirection'); 31 $this->System->RegisterPage('download.php', 'PageRedirection'); 32 $this->System->RegisterPage('serverlist.php', 'PageRedirection'); 19 $this->System->OnPageNotFound = array($this, 'ShowRedirect'); 33 20 } 34 }35 21 36 class PageRedirection extends Page 37 { 38 function Show() 22 function ShowRedirect() 39 23 { 40 24 Header($_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently'); … … 60 44 if(($this->System->PathItems[0] == 'forum') and ($this->System->PathItems[1] == 'index.php')) 61 45 Header('Location: '.$this->System->Link('/forum/')); 46 if(($this->System->PathItems[0] == 'phpbb3') and ($this->System->PathItems[1] == 'index.php')) 47 Header('Location: '.$this->System->Link('/forum/')); 48 if(($this->System->PathItems[0] == 'phpBB3') and ($this->System->PathItems[1] == 'index.php')) 49 Header('Location: '.$this->System->Link('/forum/')); 62 50 } 63 51 }
Note:
See TracChangeset
for help on using the changeset viewer.