Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($modx->event->name == 'OnPageNotFound') {
- if ($modx->getOption('friendly_urls')) {
- if (!function_exists('cleanArray')) {
- function cleanArray($array) {
- $Result = array();
- foreach ($array as $key => $value) {
- if ($value != '')
- $Result[] = $value;
- }
- return $Result;
- }
- }
- $url = cleanArray(explode('/',$_SERVER['REQUEST_URI']));
- if ($url[count($url)-1] == 'compare') {
- $modx->sendForward(118);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement