Created
January 18, 2018 07:27
-
-
Save FroggyWeb/67bde1562c6de38b69b135093f4f518d to your computer and use it in GitHub Desktop.
страницы с слешом и без
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($modx->event->name == 'OnLoadWebDocument') { | |
| $uri = $_SERVER['REQUEST_URI']; | |
| if ($modx->resource->isfolder && substr($uri, -1) != '/' && !strpos($uri, '?')) { | |
| $modx->sendRedirect($modx->makeUrl($modx->resource->id),array('responseCode' => 'HTTP/1.1 301 Moved Permanently')); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment