Skip to content

Commit

Permalink
refactor: nginx.conf updated to redirect links
Browse files Browse the repository at this point in the history
  • Loading branch information
NickIliev committed Jun 20, 2018
1 parent bb11cad commit e4ad375
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions build/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,64 @@ http {
rewrite ^/cookbook/ui/layouts/(.*) $proto://$host_and_port/ui/layouts/layout-containers permanent;
rewrite ^/cookbook/ui/(.*) $proto://$host_and_port/ui/ns-ui-widgets/$1 permanent;

# Redirect "Using Plugins" article
rewrite ^/plugins/plugins $proto://$host_and_port/core-concepts/plugins permanent;
rewrite ^/plugins/CocoaPods $proto://$host_and_port/plugins/cocoapods permanent;

# Redirect "How It Works" article
rewrite ^/start/how-it-works $proto://$host_and_port/core-concepts/technical-overview permanent;

# Redirect Chrome DevTools article
rewrite ^/tooling/chrome-devtools $proto://$host_and_port/tooling/debugging/chrome-devtools permanent;

# Redirect Layout containers article
rewrite ^/ui/layout-containers $proto://$host_and_port/ui/layouts/layout-containers permanent;
rewrite ^/angular/ui/layout-containers $proto://$host_and_port/angular/ui/layouts/layout-containers permanent;

# Redirect publishing related articles
rewrite ^/publishing/android-abi-split $proto://$host_and_port/tooling/publishing/android-abi-split permanent;
rewrite ^/publishing/publishing-android-apps $proto://$host_and_port/tooling/publishing/publishing-android-apps permanent;
rewrite ^/publishing/publishing-ios-apps $proto://$host_and_port/tooling/publishing/publishing-ios-apps permanent;

# Redirect Angular Code Samples to UI Widgets
rewrite ^/angular/code-samples/ui/(.*) $proto://$host_and_port/angular/ui/ng-ui-widgets/$1 permanent;
rewrite ^/angular/code-samples/ui/layouts $proto://$host_and_port/angular/ui/layouts/layout-containers permanent;

# Redirect the Cookbook under Framework Modules
rewrite ^/cookbook/trace $proto://$host_and_port/ns-framework-modules/trace permanent;
rewrite ^/cookbook/application $proto://$host_and_port/ns-framework-modules/application permanent;
rewrite ^/cookbook/application-settings $proto://$host_and_port/ns-framework-modules/application-settings permanent;
rewrite ^/cookbook/color $proto://$host_and_port/ns-framework-modules/color permanent;
rewrite ^/cookbook/connectivity $proto://$host_and_port/ns-framework-modules/connectivity permanent;
rewrite ^/cookbook/console $proto://$host_and_port/ns-framework-modules/console permanent;
rewrite ^/cookbook/data/observable $proto://$host_and_port/ns-framework-modules/observable permanent;
rewrite ^/cookbook/data/observable-array $proto://$host_and_port/ns-framework-modules/observable-array permanent;
rewrite ^/cookbook/data/virtual-array $proto://$host_and_port/ns-framework-modules/virtual-array permanent;
rewrite ^/cookbook/fetch $proto://$host_and_port/ns-framework-modules/fetch permanent;
rewrite ^/cookbook/file-system $proto://$host_and_port/ns-framework-modules/file-system permanent;
rewrite ^/cookbook/formatted-string $proto://$host_and_port/ns-framework-modules/formatted-string permanent;
rewrite ^/cookbook/fps-meter $proto://$host_and_port/ns-framework-modules/fps-meter permanent;
rewrite ^/cookbook/http $proto://$host_and_port/ns-framework-modules/http permanent;
rewrite ^/cookbook/image-source $proto://$host_and_port/ns-framework-modules/image-source permanent;
rewrite ^/cookbook/platform $proto://$host_and_port/ns-framework-modules/platform permanent;
rewrite ^/cookbook/timer $proto://$host_and_port/ns-framework-modules/timer permanent;
rewrite ^/cookbook/xml-parser $proto://$host_and_port/ns-framework-modules/xml-parser permanent;

# Redirect the Best Practices articles
rewrite ^/best-practices/bundling-with-webpack $proto://$host_and_port/performance-optimizations/bundling-with-webpack permanent;
rewrite ^/angular/best-practices/bundling-with-webpack $proto://$host_and_port/angular/performance-optimizations/bundling-with-webpack permanent;
rewrite ^/best-practices/images-optimisations $proto://$host_and_port/angular/performance-optimizations/images-optimisations permanent;

# Redirect the Angular Cookbook tutorial to proper "Get Started" subsections
rewrite ^/angular/tutorial/ng-chapter-0 $proto://$host_and_port/angular/start/quick-setup permanent;
rewrite ^/angular/tutorial/ng-chapter-1 $proto://$host_and_port/angular/start/hello-world/ng-chapter-1 permanent;
rewrite ^/angular/tutorial/ng-chapter-2 $proto://$host_and_port/angular/start/hello-world/ng-chapter-2 permanent;
rewrite ^/angular/tutorial/ng-chapter-3 $proto://$host_and_port/angular/start/tutorial/ng-chapter-3 permanent;
rewrite ^/angular/tutorial/ng-chapter-4 $proto://$host_and_port/angular/start/tutorial/ng-chapter-4 permanent;
rewrite ^/angular/tutorial/ng-chapter-5 $proto://$host_and_port/angular/start/tutorial/ng-chapter-5 permanent;
rewrite ^/angular/tutorial/ng-chapter-6 $proto://$host_and_port/angular/start/tutorial/ng-chapter-6 permanent;
rewrite ^/angular/tutorial/ng-chapter-7 $proto://$host_and_port/angular/start/ng-next-steps permanent;

# Redirect .html extension
rewrite ^/(.*)\.html$ $proto://$host_and_port/$1 redirect;

Expand Down

0 comments on commit e4ad375

Please sign in to comment.