Skip to content

Commit

Permalink
remove ancient workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Feb 2, 2019
1 parent 281fcca commit 5c73c2e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/compat/environment.php
Expand Up @@ -40,18 +40,12 @@ public static function initialize()
private function _httpd_setup()
{
/*
* Second, make sure the URLs not having query string (or midcom-xxx- -method signature)
* make sure the URLs not having query string (or midcom-xxx- -method signature)
* have trailing slash or some extension in the "filename".
*
* This makes life much, much better when making static copies for whatever reason
*
* 2008-09-26: Now also rewrites urls ending in .html to end with trailing slash.
*/
$redirect_test_uri = (string)$_SERVER['REQUEST_URI'];
if ( !isset($_SERVER['MIDCOM_COMPAT_REDIR'])
|| (bool)$_SERVER['MIDCOM_COMPAT_REDIR'] !== false) {
$redirect_test_uri = preg_replace('/\.html$/', '', $redirect_test_uri);
}
if ( !preg_match('%\?|/$|midcom-.+-|/.*\.[^/]+$%', $redirect_test_uri)
&& (empty($_POST))) {
$response = new RedirectResponse($redirect_test_uri . '/', 301);
Expand Down

0 comments on commit 5c73c2e

Please sign in to comment.