diff --git a/vhost.conf b/vhost.conf index 444cdf4..55ec683 100644 --- a/vhost.conf +++ b/vhost.conf @@ -1,15 +1,21 @@ - index index.html index.php; location / { + + if ($request_uri ~ ^/sites/(.*)$ ) { + return 301 /$1; + } + + if ($request_uri ~ ^/index(\.html)?$) { return 301 /; } + if ($request_uri ~ ^/(.*)\.html$) { return 301 /$1; } - + try_files $uri $uri/ $uri.html /sites$uri /sites$uri.html /index.php?$query_string; } \ No newline at end of file