# Redirect file.
# This file contains the list of rewrite rules that are applied when serving
# pages.
#
# Each redirect has four parts:
#
# - src: The path to redirect. This is a regex rule prefixed with an implied
#   '^'. Unless you're doing something advanced, your path should start with
#   '/' character.
#
# - dst: The path to redirect to. If the path begins with a slash,
#   it is considered a relative redirect. Otherwise, it is an absolute
#   redirct (and should probably begin with http: or http://). You may use
#   capturing groups to preserve part of the source path. To referece a
#   capturing group, use \N, where N is the (1-based) index of desired group.
#
# - type: Either 'permanent' or 'temporary', depending on whether you want an
#   HTTP 301 or HTTP 302 redirect, respectiviely. See RFC 2616 for the
#   difference between these:
#
#       http://tools.ietf.org/html/rfc2616
#
#   If you don't specify a type, 'permanent' will be used by default. Note that
#   this is different from the Apache convention (which uses 'temporary' by
#   default.)
#
# - comment: Currently ignored by the computer, but useful for humans.
#
# Example:
#
# redirects:
# - src: /foo
#   dst: /bar
#   # Redirect /foo to /bar. This will also redirect foo/ and
#   # foo/test.html. Note that the redirect type is optional. This will be
#   # treated as a permanent redirect.
#
# - src: /(.+droid(/.*)?)$
#   dst: /droids/\1
#   type: permanent
#   # Redirect /android to /droids/android and /bugdroid to
#   # /droids/bugdroid. However, it will not redirect /droid or
#   # /bugdroids.

#
# - src: /google
#   dst: http://www.google.com
#   type: temporary
#   # This is an example of a redirect to an absolute URI.
#
#
#   WATCH OUT -- SRC LINE HAS TO START WITH A HYPHEN !!

redirects:
# new one works
- src: /sdk/android-
  dst: /about/versions/android-
  type: permanent
  comment: Redirect sdk reference to new location

- src: /about/versions/index.html
  dst: /about/index.html
  type: permanent

- src: /about/versions/api-levels.html
  dst: /guide/topics/manifest/uses-sdk-element.html#ApiLevels
  type: permanent

# new one works
- src: /sdk/oem-usb.html
  dst: /tools/extras/oem-usb.html
  type: permanent
  comment: Redirect sdk reference to new location

- src: /sdk/installing.html
  dst: /sdk/installing/index.html
  type: permanent
  comment: Redirect sdk reference to new location

- src: /sdk/compatibility-library.html
  dst: /tools/support-library/index.html
  type: permanent

- src: /tools/extras/support-library.html
  dst: /tools/support-library/index.html
  type: permanent

- src: /training/basics/fragments/support-lib.html
  dst: /tools/support-library/setup.html
  type: permanent

- src: /training/id-auth/.*
  dst: /google/play-services/auth.html
  type: permanent

# new one works
- src: /sdk/eclipse-adt.html
  dst: /tools/sdk/eclipse-adt.html
  type: permanent
  comment: Redirect sdk reference to new location

# new one works
- src: /sdk/tools-notes.html
  dst: /tools/sdk/tools-notes.html
  type: permanent
  comment: Redirect sdk reference to new location

# new one works
- src: /sdk/adding-components.html
  dst: /sdk/exploring.html
  type: permanent
  comment: Redirect sdk reference to new location

- src: /sdk/ndk/overview.html
  dst: /tools/sdk/ndk/index.html
  type: permanent

- src: /sdk/ndk/
  dst: /tools/sdk/ndk/
  type: permanent
  comment: Redirect sdk reference to new location

- src: /tools/sdk/win-usb.html
  dst: /sdk/win-usb.html
  type: permanent

- src: /tools/sdk/index.html
  dst: /sdk/index.html
  type: permanent

- src: /tools/sdk/installing.html
  dst: /sdk/installing/bundle.html
  type: permanent

#new one works
- src: /sdk/requirements.html
  dst: /sdk/index.html
  type: permanent
  comment: Redirect sdk reference to new location

- src: /sdk/installing/next.html
  dst: /training/basics/firstapp/index.html
  type: permanent
  comment: Next steps doc was lame and everybody should go to first class


#- src: /sdk/(?!index.html|installing/|exploring)
#  dst: /tools/sdk/
#  type: permanent
#  comment: Redirect sdk reference to new location

#- src: /sdk/compatibility
#  dst: /tools/sdk/support-package.html
#  type: permanent
#  comment: Redirect to new location

# new one
- src: /guide/market/
  dst: /google/play/
  type: permanent
  comment: redirect billing to new loc

- src: /guide/google/gcm/client-javadoc/.*
  dst: /reference/com/google/android/gcm/package-summary.html
  type: permanent
  comment: redirect to new loc

- src: /guide/google/gcm/server-javadoc/.*
  dst: /reference/com/google/android/gcm/server/package-summary.html
  type: permanent
  comment: redirect to new loc

- src: /guide/google/play/services.html
  dst: /google/play-services/index.html
  type: permanent
  comment: redirect to new loc

- src: /guide/google/
  dst: /google/
  type: permanent
  comment: redirect to new loc

- src: /guide/publishing/licensing.html
  dst: /google/play/licensing/index.html
  type: permanent
  comment: Redirect Licensing docs to new location

# new one
- src: /google/play/billing/billing_about.html
  dst: /google/play/billing/index.html
  type: permanent
  comment: Redirect Licensing docs to new location

- src: /guide/developing/tools/
  dst: /tools/help/
  type: permanent
  comment: Redirect to new location

- src: /guide/developing/
  dst: /tools/
  type: permanent
  comment: Redirect to new location

- src: /tools/aidl.html
  dst: /guide/components/aidl.html
  type: permanent

- src: /guide/market/publishing/multiple-apks.html
  dst: /google/play/publishing/multiple-apks.html
  type: permanent
  comment: Redirect to new location

- src: /guide/publishing/publishing.html
  dst: /distribute/googleplay/publish/preparing.html
  type: permanent
  comment: Redirect to new location

- src: /guide/publishing/
  dst: /tools/publishing/
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/fundamentals.html
  dst: /guide/components/fundamentals.html
  type: permanent

- src: /guide/topics/intents/intents-filters.html
  dst: /guide/components/intents-filters.html
  type: permanent

- src: /guide/topics/fundamentals/
  dst: /guide/components/
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/clipboard/copy-paste.html
  dst: /guide/topics/text/copy-paste.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/ui/notifiers/index.html
  dst: /guide/topics/ui/notifiers/notifications.html
  type: permanent
  comment: Flatten side nav to make Notifications and Toasts separate

# new one
- src: /guide/topics/wireless/
  dst: /guide/topics/connectivity/
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/topics/drawing/.*
  dst: /guide/topics/graphics/opengl.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/connectivity/usb/adk.html
  dst: /tools/adk/index.html
  type: permanent

- src: /tools/workflow/publishing/versioning.html
  dst: /tools/publishing/versioning.html
  type: permanent

- src: /tools/workflow/publishing/publishing.html
  dst: /tools/publishing/publishing_overview.html
  type: permanent

- src: /tools/workflow/publishing_overview.html
  dst: /tools/publishing/publishing_overview.html
  type: permanent

- src: /tools/workflow/publishing/publishing_overview.html
  dst: /tools/publishing/publishing_overview.html
  type: permanent

- src: /tools/workflow/app-signing.html
  dst: /tools/publishing/app-signing.html
  type: permanent

- src: /tools/adk/aoa.html
  dst: http://source.android.com/tech/accessories/aoap/aoa.html
  type: permanent
  comment: Open Accessory Protocol content has moved to source.android.com.

- src: /tools/adk/aoa2.html
  dst: http://source.android.com/tech/accessories/aoap/aoa2.html
  type: permanent
  comment: Open Accessory Protocol content has moved to source.android.com.

- src: /guide/topics/usb
  dst: /guide/topics/connectivity/usb
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/appendix/api-levels.html
  dst: /guide/topics/manifest/uses-sdk-element.html#ApiLevels
  type: permanent
  comment: Redirect to new location

- src: /guide/appendix/install-location.html
  dst: /guide/topics/data/install-location.html
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/basics/.*
  dst: /about/index.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/security/security.html
  dst: /training/articles/security-tips.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/security/index.html
  dst: /training/articles/security-tips.html
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/appendix/market-filters.html
  dst: /google/play/filters.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/testing/
  dst: /tools/testing/
  type: permanent

- src: /guide/topics/graphics/animation.html
  dst: /guide/topics/graphics/overview.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/graphics/renderscript/(compute.html|index.html|reference.html)
  dst: /guide/topics/renderscript/index.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/graphics/renderscript.html
  dst: /guide/topics/renderscript/index.html
  type: permanent
  comment: Redirect to new location

- src: /guide/topics/location/obtaining-user-location.html
  dst: /guide/topics/location/strategies.html
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/topics/nfc/
  dst: /guide/topics/connectivity/nfc/
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/topics/wireless/
  dst: /guide/topics/connectivity/
  type: permanent
  comment: Redirect to new location

# new one
- src: /guide/topics/network/
  dst: /guide/topics/connectivity/
  type: permanent
  comment: Redirect to new location

# new one
- src: /resources/articles/creating-input-method.html
  dst: /guide/topics/text/creating-input-method.html
  type: permanent

# new one
- src: /resources/articles/spell-checker-framework.html
  dst: /guide/topics/text/spell-checker-framework.html
  type: permanent

# new one
- src: /resources/tutorials/notepad/
  dst: /training/notepad/
  type: permanent
  comment: this is only for external links, until we update this documentation

# new one
- src: /resources/faq/
  dst: /guide/faq/
  type: permanent
  comment: FAQ still needs a permanent home

# new one
- src: /resources/tutorials/hello-world.html
  dst: /training/basics/firstapp/index.html
  type: permanent
  comment: Redirect to new location

# add the rest of the tutorials here

- src: /guide/practices/design/
  dst: /guide/practices/
  type: permanent
  comment: Redirect to new location

- src: /guide/practices/accessibility.html
  dst: /guide/topics/ui/accessibility/index.html
  type: permanent

# move best practices to training

- src: /guide/practices/app-design/performance.html
  dst: /training/articles/perf-tips.html
  type: permanent

- src: /guide/practices/performance.html
  dst: /training/articles/perf-tips.html
  type: permanent

- src: /guide/practices/app-design/responsiveness.html
  dst: /training/articles/perf-anr.html
  type: permanent

- src: /guide/practices/responsiveness.html
  dst: /training/articles/perf-anr.html
  type: permanent

- src: /guide/practices/security.html
  dst: /training/articles/security-tips.html
  type: permanent

- src: /guide/practices/jni.html
  dst: /training/articles/perf-jni.html
  type: permanent

# move ui docs to design

- src: /guide/practices/ui_guidelines/index.html
  dst: /design/index.html
  type: permanent

- src: /guide/practices/ui_guidelines/icon_design.*
  dst: /design/style/iconography.html
  type: permanent

- src: /guide/practices/ui_guidelines/activity_task_design.html
  dst: /design/patterns/app-structure.html
  type: permanent

- src: /guide/practices/ui_guidelines/menu_design.html
  dst: /design/patterns/actionbar.html
  type: permanent


# new one
- src: /resources/dashboard/.*
  dst: /about/dashboards/index.html
  type: permanent
  comment: Redirect to new location

- src: /resources/community-groups.html
  dst: /support.html
  type: permanent
  comment: Redirect to new location

- src: /guide/tutorials/
  dst: /resources/tutorials/
  type: permanent

- src: /resources/tutorials/views/hello-linearlayout.html
  dst: /guide/topics/ui/layout/linear.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-relativelayout.html
  dst: /guide/topics/ui/layout/relative.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-listview.html
  dst: /guide/topics/ui/layout/listview.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-gridview.html
  dst: /guide/topics/ui/layout/gridview.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-webview.html
  dst: /guide/webapps/webview.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-formstuff.html
  dst: /guide/topics/ui/controls.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-datepicker.html
  dst: /guide/topics/ui/controls/pickers.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-timepicker.html
  dst: /guide/topics/ui/controls/pickers.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-autocomplete.html
  dst: /guide/topics/ui/controls/text.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/views/hello-spinner.html
  dst: /guide/topics/ui/controls/spinner.html
  type: permanent
  comment: Redirect to new location

- src: /resources/tutorials/opengl/opengl-es10.html
  dst: /training/graphics/opengl/index.html
  type: permanent

- src: /resources/tutorials/opengl/opengl-es20.html
  dst: /training/graphics/opengl/index.html
  type: permanent

- src: /resources/tutorials/views/hello-mapview.html
  dst: https://developers.google.com/maps/documentation/android/hello-mapview
  type: permanent

- src: /resources/tutorials/views/.*
  dst: /guide/topics/ui/declaring-layout.html#CommonLayouts
  type: permanent

- src: /guide/topics/ui/layout-objects.html
  dst: /guide/topics/ui/declaring-layout.html#CommonLayouts
  type: permanent

- src: /resources/tutorials/localization/.*
  dst: /training/basics/supporting-devices/languages.html
  type: permanent

- src: /resources/samples/.*
  dst: /tools/samples/index.html
  type: permanent
  comment: Redirect to new location

- src: /resources/(?!articles)
  dst: /training/
  type: permanent
  comment: Redirect to new location

- src: /guide/publishing/publishing.html#BuildaButton
  dst: /distribute/googleplay/promote/badges.html
  type: permanent
  comment: Redirect to new location

- src: /guide/index.html
  dst: /guide/components/index.html
  type: permanent
  comment: Redirect to new location



# ------------------- TRAINING -------------------

- src: /guide/topics/ui/layout/tabs.html
  dst: /training/implementing-navigation/lateral.html
  type: permanent

- src: /training/cloudsync/aesync.html
  dst: /google/gcm/index.html
  type: permanent
  comment: Syncing with App Engine was removed because it's obsolete.

- src: /training/basics/location/
  dst: /training/location/
  type: permanent

# -------------------- MISC ----------------------

- src: /shareables/
  dst: http://commondatastorage.googleapis.com/androiddevelopers/shareables/
  type: permanent
  comment: Redirect to new location

- src: /downloads/
  dst: http://commondatastorage.googleapis.com/androiddevelopers/
  type: permanent
  comment: Redirect to new location

- src: /search.html
  dst: /index.html
  type: permanent
  comment: Redirect to new location

- src: /videos/index.html
  dst: /develop/index.html
  type: permanent
  comment: Redirect to new location

- src: /live/index.html
  dst: https://developers.google.com/live/
  type: permanent
  comment: Redirect to new location

- src: /intl/zh-CN/...
  dst: /intl/zh-cn/...
  type: permanent

- src: /intl/zh-TW/...
  dst: /intl/zh-tw/...
  type: permanent

# -------------------- EASTER EGG REDIRECTS ----------------------





# ---------- PLATFORM VERSIONS ----------------

- src: /4.2
  dst: /about/versions/android-4.2.html
  type: permanent

- src: /4.1
  dst: /about/versions/android-4.1.html
  type: permanent

- src: /4.0
  dst: /about/versions/android-4.0.html
  type: permanent

- src: /(k|kk|kitkat)/?$
  dst: /about/versions/kitkat.html
  type: permanent

- src: /(j|jb|jellybean)/?$
  dst: /about/versions/jelly-bean.html
  type: permanent

- src: /(i|ics|icecreamsandwich)/?$
  dst: /about/versions/android-4.0-highlights.html
  type: permanent

- src: /(h|hc|honeycomb)/?$
  dst: /about/versions/android-3.0-highlights.html
  type: permanent

- src: /(g|gb|gingerbread)/?$
  dst: /about/versions/android-2.3-highlights.html
  type: permanent

# ---------- MISC -----------------

- src: /%2B/?$
  dst: https://plus.google.com/108967384991768947849/posts
  type: permanent
  comment: Redirect /+ and /+/ to Google+

- src: /blog
  dst: http://android-developers.blogspot.com/
  type: permanent

- src: /stats
  dst: /about/dashboards/index.html
  type: permanent

- src: /youtube
  dst: http://www.youtube.com/user/androiddevelopers
  type: permanent

- src: /playbadge/?$
  dst: http://developer.android.com/distribute/googleplay/promote/badges.html
  type: permanent

- src: /deviceart/?$
  dst: http://developer.android.com/distribute/promote/device-art.html
  type: permanent

- src: /edu/signup/?$
  dst: https://services.google.com/fb/forms/playedu
  type: permanent

- src: /edu/?$
  dst: /distribute/googleplay/edu/index.html
  type: permanent

- src: /edu/signup
  dst: https://services.google.com/fb/forms/playedu
  type: permanent
