Skip to content

Commit

Permalink
[TASK] Import current TER version, 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenmalling committed Mar 11, 2014
0 parents commit f586b1c
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
22 changes: 22 additions & 0 deletions class.tx_forcerealurls.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

class tx_forcerealurls {

function check($params,$pObj) {
if ($pObj->siteScript && $pObj->config['config']['tx_realurl_enable'] && (
substr($pObj->siteScript, 0, 9) == 'index.php' ||
substr($pObj->siteScript, 0, 1) == '?'
)) {
$baseURL = $pObj->config['config']['baseURL'];
$LD = $pObj->tmpl->linkData($pObj->page,'',$pObj->no_cache,'','',t3lib_div::getIndpEnv('QUERY_STRING'));
$url = $baseURL.$LD['totalURL'];

header('HTTP/1.1 301 Moved Permanently');
header('Location: '.$url);

exit;
}
}
}

?>
Binary file added doc/manual.sxw
Binary file not shown.
52 changes: 52 additions & 0 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

/***************************************************************
* Extension Manager/Repository config file for ext "forcerealurls".
*
* Auto generated 11-03-2014 09:35
*
* Manual updates:
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/

$EM_CONF[$_EXTKEY] = array (
'title' => 'Force RealURLs',
'description' => 'Checks if a page is trying to be accessed by an old style URL, and does a 301 redirect to the appropriate URL if so',
'category' => 'fe',
'shy' => 0,
'version' => '0.1.0',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'loadOrder' => '',
'module' => '',
'state' => 'beta',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearcacheonload' => 0,
'lockType' => '',
'author' => 'Christian Jul Jensen',
'author_email' => 'julle(at)typo3.org',
'author_company' => '',
'CGLcompliance' => NULL,
'CGLcompliance_note' => NULL,
'constraints' =>
array (
'depends' =>
array (
'cms' => '',
'php' => '3.0.0-0.0.0',
'typo3' => '3.7.0-0.0.0',
),
'conflicts' =>
array (
),
'suggests' =>
array (
),
),
);

?>
Binary file added ext_icon.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions ext_localconf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting']['tx_forcerealurls'] = 'EXT:forcerealurls/class.tx_forcerealurls.php:tx_forcerealurls->check';
?>

0 comments on commit f586b1c

Please sign in to comment.