Changeset 17715
- Timestamp:
- 09/26/08 12:43:08 (2 months ago)
- Files:
-
- branches/MidCOM_2_8/midcom.core/midcom.php (modified) (2 diffs)
- branches/MidCOM_2_8/midgard.admin.wizards/viewer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.core/midcom.php
r15517 r17715 27 27 * 28 28 * This makes life much, much better when making static copies for whatever reason 29 * 30 * 2008-09-26: Now also rewrites urls ending in .html to end with trailing slash. 29 31 */ 30 if ( !preg_match('%\?|/$|midcom-.+-|/.+\..+$%', $_SERVER['REQUEST_URI']) 32 $redirect_test_uri = (string)$_SERVER['REQUEST_URI']; 33 $redirect_test_uri = preg_replace('/\.html$/', '', $redirect_test_uri); 34 if ( !preg_match('%\?|/$|midcom-.+-|/.+\..+$%', $redirect_test_uri) 31 35 && ( !isset($_POST) 32 36 || empty($_POST)) … … 34 38 { 35 39 header('HTTP/1.0 301 Moved Permanently'); 36 header("Location: {$ _SERVER['REQUEST_URI']}/");37 echo "301: new location <a href='{$ _SERVER['REQUEST_URI']}/'>{$_SERVER['REQUEST_URI']}/</a>";40 header("Location: {$redirect_test_uri}/"); 41 echo "301: new location <a href='{$redirect_test_uri}/'>{$redirect_test_uri}/</a>"; 38 42 exit(); 39 43 } 44 unset($redirect_test_uri); 40 45 41 46 /** */ branches/MidCOM_2_8/midgard.admin.wizards/viewer.php
r15981 r17715 208 208 array 209 209 ( 210 MIDCOM_TOOLBAR_URL => 'config .html',210 MIDCOM_TOOLBAR_URL => 'config/', 211 211 MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), 212 212 MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),
