Skip to content

Instantly share code, notes, and snippets.

@hissy
Created August 18, 2016 05:36
Show Gist options
  • Save hissy/80ec8994cc924577f5701300578f274b to your computer and use it in GitHub Desktop.
Save hissy/80ec8994cc924577f5701300578f274b to your computer and use it in GitHub Desktop.
#concrete5 Redirect /index.php to /
<?php
// For concrete5.6
// config/site_post_autoload.php
if (
$_SERVER['REQUEST_URI'] == '/index.php' &&
!$_REQUEST['btask'] &&
!$_GET['atask'] &&
!$_REQUEST['ctask'] &&
!$_REQUEST['ptask'] &&
!$_REQUEST['processBlock'] &&
!$_POST['processCollection']
) {
header('Location: ' . BASE_URL . DIR_REL . '/');
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment