Skip to content

Instantly share code, notes, and snippets.

@HostOnNet
Created November 29, 2017 17:14
Show Gist options
  • Save HostOnNet/434107283e3e7f8ce0dfc970e4c3c950 to your computer and use it in GitHub Desktop.
Save HostOnNet/434107283e3e7f8ce0dfc970e4c3c950 to your computer and use it in GitHub Desktop.
$requestUrl = $_SERVER['REQUEST_URI'];
$requestUrlEnd = substr($requestUrl, -1);
if ($requestUrlEnd != "/") {
$numSlash = explode("/", $requestUrl);
if (count($numSlash) == 2) {
Header("Location: https://maxpots.eu" . $requestUrl . "/");
exit;
}
}
@HostOnNet
Copy link
Author

.htaccess, added

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://maxpots.eu/$1 [R,L]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment