Skip to content

Commit

Permalink
chore: add some redirects and trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Najmabadi committed Nov 26, 2024
1 parent cd8f7f7 commit 6598e12
Showing 1 changed file with 69 additions and 38 deletions.
107 changes: 69 additions & 38 deletions liara_nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ location = /404.html {
internal;
}



location / {

if ($request_uri !~ /$) {
return 301 $request_uri/;
}

}



# location / {
# rewrite ^/(.*)/$ /$1 permanent;
# }
Expand Down Expand Up @@ -1409,15 +1421,15 @@ location ~ ^/deployments/angular/?$ {
return 301 /paas/angular/getting-started;
}

location ~ ^/app-deploy/netcore/envs?$ {
location ~ ^/app-deploy/netcore/envs/?$ {
return 301 /paas/dotnet/how-tos/set-envs;
}

location ~ ^/apps/volumes?$ {
location ~ ^/apps/volumes/?$ {
return 301 /paas/disks/about;
}

location ~ ^/app-features/applets?$ {
location ~ ^/app-features/applets/?$ {
return 301 /paas/docker/related-apps/applets;
}

Expand All @@ -1433,7 +1445,7 @@ location ~ ^/app-deploy/netcore/websocket/?$ {
return 301 /paas/dotnet/how-tos/use-websocket;
}

location ~ ^/managing-multiple-acounts?$ {
location ~ ^/managing-multiple-acounts/?$ {
return 301 /references/console/manage-accounts;
}

Expand All @@ -1445,35 +1457,35 @@ location ~ ^/apps/console/?$ {
return 301 /references/console/about;
}

location ~ ^/app-deploy/netcore/email?$ {
location ~ ^/app-deploy/netcore/email/?$ {
return 301 /email-server/how-tos/connect-via-platform/dotnet;
}

location ~ ^/app-deploy/netcore/disks/?$ {
return 301 /paas/dotnet/how-tos/use-disk;
}

location ~ ^/one-click-apps/([^/]+)/how-tos/quick-start$ {
location ~ ^/one-click-apps/([^/]+)/how-tos/quick-start/$ {
return 301 /one-click-apps/$1/quick-start;
}

location ~ ^/instructions/nextjs?$ {
location ~ ^/instructions/nextjs/?$ {
return 301 /paas/nextjs/getting-started;
}

location ~ ^/instructions/nextjs?$ {
location ~ ^/instructions/nextjs/?$ {
return 301 /paas/nextjs/getting-started;
}

location ~ ^/instructions/golang/?$ {
return 301 /paas/docker/related-apps/go;
}

location ~ ^/apps/logs?$ {
location ~ ^/apps/logs/?$ {
return 301 /paas/details/observations/about;
}

location ~ ^/app-deploy/php/cloud-storage?$ {
location ~ ^/app-deploy/php/cloud-storage/?$ {
return 301 /object-storage/how-tos/connect-via-platform/dotnet;
}

Expand All @@ -1489,115 +1501,134 @@ location ~ ^/app-deploy/netcore/browser/?$ {
return 301 /paas/dotnet/how-tos/deploy-app;
}

location ~ ^/databases/mysql-mariadb/install?$ {
location ~ ^/databases/mysql-mariadb/install/?$ {
return 301 /dbaas/mysql/quick-setup;
}

location ~ ^/app-deploy/flask/desktop?$ {
location ~ ^/app-deploy/flask/desktop/?$ {
return 301 /paas/flask/how-tos/deploy-app;
}

location ~ ^/clients/cli?$ {
location ~ ^/clients/cli/?$ {
return 301 /references/cli/about;
}

location ~ ^/app-deploy/django/desktop?$ {
location ~ ^/app-deploy/django/desktop/?$ {
return 301 /paas/django/how-tos/deploy-app;
}

location ~ ^/instructions/prestashop?$ {
location ~ ^/instructions/prestashop/?$ {
return 301 /one-click-apps/prestashop/quick-start/;
}

location ~ ^/deployments/laravel?$ {
location ~ ^/deployments/laravel/?$ {
return 301 /paas/laravel/how-tos/deploy-app/;
}

location ~ ^/apps/environment-variables?$ {
location ~ ^/apps/environment-variables/?$ {
return 301 /paas/details/envs/;
}

location ~ ^/databases/mysql-mariadb/backup?$ {
location ~ ^/databases/mysql-mariadb/backup/?$ {
return 301 /dbaas/mariadb/how-tos/create-backup;
}

location ~ ^/apps/fixed-ip?$ {
location ~ ^/apps/fixed-ip/?$ {
return 301 /paas/details/static-ip/;
}

location ~ ^/deployments/static?$ {
location ~ ^/deployments/static/?$ {
return 301 /paas/static/how-tos/deploy-app/;
}

location ~ ^/buckets/domain?$ {
location ~ ^/buckets/domain/?$ {
return 301 /object-storage/add-domain/;
}

location ~ ^/wp-plus/domain?$ {
location ~ ^/wp-plus/domain/?$ {
return 301 /paas/domains/add-domain/;
}

location ~ ^/wp-plus/domain?$ {
location ~ ^/wp-plus/domain/?$ {
return 301 /paas/domains/add-domain/;
}

location ~ ^/deployments/docker?$ {
location ~ ^/deployments/docker/?$ {
return 301 /paas/docker/how-tos/deploy-app/;
}

location ~ ^/app-deploy/vue/desktop?$ {
location ~ ^/app-deploy/vue/desktop/?$ {
return 301 /paas/vue/how-tos/deploy-app/;
}

location ~ ^/apps/disks?$ {
location ~ ^/apps/disks/?$ {
return 301 /paas/disks/about/;
}

location ~ ^/instructions/rabbitmq?$ {
location ~ ^/instructions/rabbitmq/?$ {
return 301 /dbaas/rabbitmq/quick-setup;
}

location ~ ^/apps/health-check?$ {
location ~ ^/apps/health-check/?$ {
return 301 /paas/details/health-check/;
}

location ~ ^/apps/health-check?$ {
location ~ ^/apps/health-check/?$ {
return 301 /paas/details/health-check/;
}

location ~ ^/deployments/nodejs?$ {
location ~ ^/deployments/nodejs/?$ {
return 301 /paas/nodejs/how-tos/deploy-app/;
}

location ~ ^/one-click-apps/wordpress?$ {
location ~ ^/one-click-apps/wordpress/?$ {
return 301 /one-click-apps/wordpress/quick-start/;
}

location ~ ^/app-deploy/php/desktop?$ {
location ~ ^/app-deploy/php/desktop/?$ {
return 301 /paas/php/how-tos/deploy-app/;
}

location ~ ^/domains/ssl?$ {
location ~ ^/domains/ssl/?$ {
return 301 /paas/domains/enable-ssl/;
}

location ~ ^/app-deploy/laravel/desktop?$ {
location ~ ^/app-deploy/laravel/desktop/?$ {
return 301 /paas/laravel/how-tos/deploy-app/;
}

location ~ ^/apps/ftp?$ {
location ~ ^/apps/ftp/?$ {
return 301 /paas/disks/ftp-access/;
}

location ~ ^/buckets/transfer?$ {
location ~ ^/buckets/transfer/?$ {
return 301 /object-storage/how-tos/move-bucket/;
}

location ~ ^/app-deploy/netcore/cli?$ {
location ~ ^/app-deploy/netcore/cli/?$ {
return 301 /paas/dotnet/how-tos/deploy-app/;
}

# 200 - page 20
location ~ ^/app-deploy/laravel/desktop/?$ {
return 301 /paas/laravel/how-tos/deploy-app/;
}

location ~ ^/app-deploy/php/desktop/?$ {
return 301 /paas/php/how-tos/deploy-app/;
}

location ~ ^/app-deploy/nextjs/envs/?$ {
return 301 /paas/nextjs/how-tos/set-envs/;
}

location ~ ^/app-deploy/nextjs/envs/?$ {
return 301 /paas/nextjs/how-tos/set-envs/;
}

location ~ ^/.*?/applets/?$ {
return 301 /paas/details/events/;
}




Expand Down

0 comments on commit 6598e12

Please sign in to comment.