Bazel DevSite: Fix links that rely on redirects.

During the recent site overhaul a lot of files were moved to new locations, without updating any links to them. Instead, redirects were set up.

This works fine for files @ HEAD, but breaks horribly for the 6.0 docs (and any future release docs).

Consequently, this CL fixes the links for both HEAD and 6.0 to avoid such problems in the future.

PiperOrigin-RevId: 496481366
Change-Id: I0bfde556cbb61d6ba50dd24120febf87ab46302d
diff --git a/site/en/docs/android-build-performance.md b/site/en/docs/android-build-performance.md
index fcd3e63..ca83f79 100644
--- a/site/en/docs/android-build-performance.md
+++ b/site/en/docs/android-build-performance.md
@@ -12,7 +12,7 @@
 ## Recommended flags {:#recommended-flags}
 
 The flags are in the
-[`bazelrc` configuration syntax](/docs/bazelrc#bazelrc-syntax-semantics), so
+[`bazelrc` configuration syntax](/run/bazelrc#bazelrc-syntax-semantics), so
 they can be pasted directly into a `bazelrc` file and invoked with
 `--config=<configuration_name>` on the command line.
 
diff --git a/site/en/docs/android-instrumentation-test.md b/site/en/docs/android-instrumentation-test.md
index 0006d02..669ed67 100644
--- a/site/en/docs/android-instrumentation-test.md
+++ b/site/en/docs/android-instrumentation-test.md
@@ -6,7 +6,7 @@
 {% include "_buttons.html" %}
 
 _If you're new to Bazel, start with the [Building Android with
-Bazel](/tutorials/android-app) tutorial._
+Bazel](/start/android-app ) tutorial._
 
 ![Running Android instrumentation tests in parallel](/docs/images/android_test.gif "Android instrumentation test")
 
diff --git a/site/en/docs/android-ndk.md b/site/en/docs/android-ndk.md
index d50cd90..1ac0b26 100644
--- a/site/en/docs/android-ndk.md
+++ b/site/en/docs/android-ndk.md
@@ -6,7 +6,7 @@
 {% include "_buttons.html" %}
 
 _If you're new to Bazel, please start with the [Building Android with
-Bazel](/tutorials/android-app) tutorial._
+Bazel](/start/android-app ) tutorial._
 
 ## Overview {:#overview}
 
@@ -247,8 +247,8 @@
 ## Integration with platforms and toolchains {:#integration-platforms}
 
 Bazel's configuration model is moving towards
-[platforms](/docs/platforms) and
-[toolchains](/docs/toolchains). If your
+[platforms](/extending/platforms) and
+[toolchains](/extending/toolchains). If your
 build uses the `--platforms` flag to select for the architecture or operating system
 to build for, you will need to pass the `--extra_toolchains` flag to Bazel in
 order to use the NDK.
@@ -323,7 +323,7 @@
 ABI and STL configuration.
 
 Behind the scenes, this automatic configuration uses Android [configuration
-transitions](/rules/rules#configurations).
+transitions](/extending/rules#configurations).
 
 A compatible rule, like `android_binary`, automatically changes the
 configuration of its dependencies to an Android configuration, so only
@@ -388,7 +388,7 @@
 
 Note: All of the targets on the command line must be compatible with
 building for Android when specifying these flags, which may make it difficult to
-use [Bazel wild-cards](/docs/build#specifying-build-targets) like
+use [Bazel wild-cards](/run/build#specifying-build-targets) like
 `/...` and `:all`.
 
 These flags can be put into a `bazelrc` config (one for each ABI), in
diff --git a/site/en/docs/bazel-and-android.md b/site/en/docs/bazel-and-android.md
index 9797c27..2e0e1f6 100644
--- a/site/en/docs/bazel-and-android.md
+++ b/site/en/docs/bazel-and-android.md
@@ -13,7 +13,7 @@
 
 The following resources will help you work with Bazel on Android projects:
 
-*  [Tutorial: Building an Android app](/tutorials/android-app). This
+*  [Tutorial: Building an Android app](/start/android-app ). This
    tutorial is a good place to start learning about Bazel commands and concepts,
    and how to build Android apps with Bazel.
 *  [Codelab: Building Android Apps with Bazel](https://developer.android.com/codelabs/bazel-android-intro#0){: .external}.
diff --git a/site/en/docs/bazel-and-apple.md b/site/en/docs/bazel-and-apple.md
index cddf900..3c750fd 100644
--- a/site/en/docs/bazel-and-apple.md
+++ b/site/en/docs/bazel-and-apple.md
@@ -13,7 +13,7 @@
 
 The following resources will help you work with Bazel on macOS and iOS projects:
 
-*  [Tutorial: Building an iOS app](/tutorials/ios-app)
+*  [Tutorial: Building an iOS app](/start/ios-app))
 *  [Objective-C build rules](/reference/be/objective-c)
 *  [General Apple rules](https://github.com/bazelbuild/rules_apple){: .external}
 *  [Integration with Xcode](/install/ide)
@@ -31,7 +31,7 @@
 You do not need it when getting started with Bazel.
 
 The following modules, configuration fragments, and providers will help you
-[extend Bazel's capabilities](/rules/concepts)
+[extend Bazel's capabilities](/extending/concepts)
 when building your macOS and iOS projects:
 
 *  Modules:
diff --git a/site/en/docs/bazel-and-cpp.md b/site/en/docs/bazel-and-cpp.md
index b8332e8..aab47cd 100644
--- a/site/en/docs/bazel-and-cpp.md
+++ b/site/en/docs/bazel-and-cpp.md
@@ -13,7 +13,7 @@
 
 The following resources will help you work with Bazel on C++ projects:
 
-*  [Tutorial: Building a C++ project](/tutorials/cpp)
+*  [Tutorial: Building a C++ project](/start/cpp)
 *  [C++ common use cases](/tutorials/cpp-use-cases)
 *  [C/C++ rules](/reference/be/c-cpp)
 *  Essential Libraries
@@ -21,12 +21,12 @@
    -  [Boost](https://github.com/nelhage/rules_boost){: .external}
    -  [HTTPS Requests: CPR and libcurl](https://github.com/hedronvision/bazel-make-cc-https-easy){: .external}
 *  [C++ toolchain configuration](/docs/cc-toolchain-config-reference)
-*  [Tutorial: Configuring C++ toolchains](/tutorials/cc-toolchain-config)
-*  [Integrating with C++ rules](/docs/integrating-with-rules-cc)
+*  [Tutorial: Configuring C++ toolchains](/tutorials/ccp-toolchain-config)
+*  [Integrating with C++ rules](/configure/integrate-cpp)
 
 ## Best practices {:#best-practices}
 
-In addition to [general Bazel best practices](/docs/best-practices), below are
+In addition to [general Bazel best practices](/configure/best-practices), below are
 best practices specific to C++ projects.
 
 ### BUILD files {:#build-files}
diff --git a/site/en/docs/bazel-and-java.md b/site/en/docs/bazel-and-java.md
index 5179370..0fb9f11 100644
--- a/site/en/docs/bazel-and-java.md
+++ b/site/en/docs/bazel-and-java.md
@@ -13,7 +13,7 @@
 
 The following resources will help you work with Bazel on Java projects:
 
-*   [Tutorial: Building a Java Project](/tutorials/java)
+*   [Tutorial: Building a Java Project](/start/java)
 *   [Java rules](/reference/be/java)
 
 ## Migrating to Bazel {:#migrating-to-bazel}
@@ -86,7 +86,7 @@
 
 ## Best practices {:#best-practices}
 
-In addition to [general Bazel best practices](/docs/best-practices), below are
+In addition to [general Bazel best practices](/configure/best-practices), below are
 best practices specific to Java projects.
 
 ### Directory structure {:#directory-structure}
@@ -128,7 +128,7 @@
 not need it when getting started with Bazel.
 
 The following modules, configuration fragments, and providers will help you
-[extend Bazel's capabilities](/rules/concepts) when building your Java
+[extend Bazel's capabilities](/extending/concepts) when building your Java
 projects:
 
 *   Main Java provider: [`java_common`](/rules/lib/java_common)
diff --git a/site/en/docs/configurable-attributes.md b/site/en/docs/configurable-attributes.md
index f494d3c..ff79369 100644
--- a/site/en/docs/configurable-attributes.md
+++ b/site/en/docs/configurable-attributes.md
@@ -265,7 +265,7 @@
 While the ability to specify multiple flags on the command line provides
 flexibility, it can also be burdensome to individually set each one every time
 you want to build a target.
-   [Platforms](/docs/platforms)
+   [Platforms](/extending/platforms)
 let you consolidate these into simple bundles.
 
 ```python
@@ -360,7 +360,7 @@
 check against single values.
 
 Platforms are still under development. See the
-[documentation](/concepts/platforms-intro) for details.
+[documentation](/concepts/platforms) for details.
 
 ## Combining `select()`s {:#combining-selects}
 
@@ -627,7 +627,7 @@
 This is for two reasons.
 
 First, macros that need to know which path a `select` will choose *cannot work*
-because macros are evaluated in Bazel's [loading phase](/docs/build#loading),
+because macros are evaluated in Bazel's [loading phase](/run/build#loading),
 which occurs before flag values are known.
 This is a core Bazel design restriction that's unlikely to change any time soon.
 
@@ -637,14 +637,14 @@
 
 ## Bazel query and cquery {:#query-and-cquery}
 
-Bazel [`query`](/docs/query-how-to) operates over Bazel's
+Bazel [`query`](//query/guide) operates over Bazel's
 [loading phase](/reference/glossary#loading-phase).
 This means it doesn't know what command line flags a target uses since those
 flags aren't evaluated until later in the build (in the
 [analysis phase](/reference/glossary#analysis-phase)).
 So it can't determine which `select()` branches are chosen.
 
-Bazel [`cquery`](/docs/cquery) operates after Bazel's analysis phase, so it has
+Bazel [`cquery`](/query/cquery) operates after Bazel's analysis phase, so it has
 all this information and can accurately resolve `select()`s.
 
 Consider:
@@ -705,7 +705,7 @@
 
 The key issue this question usually means is that select() doesn't work in
 *macros*. These are different than *rules*. See the
-documentation on [rules](/rules/rules) and [macros](/rules/macros)
+documentation on [rules](/extending/rules) and [macros](/extending/macros)
 to understand the difference.
 Here's an end-to-end example:
 
@@ -958,7 +958,7 @@
 ### Why doesn't my select() choose what I expect? {:#faq-select-choose-condition}
 
 If `//myapp:foo` has a `select()` that doesn't choose the condition you expect,
-use [cquery](/docs/cquery) and `bazel config` to debug:
+use [cquery](/query/cquery) and `bazel config` to debug:
 
 If `//myapp:foo` is the top-level target you're building, run:
 
@@ -999,7 +999,7 @@
 Then compare this output against the settings expected by each `config_setting`.
 
 `//myapp:foo` may exist in different configurations in the same build. See the
-[cquery docs](/docs/cquery) for guidance on using `somepath` to get the right
+[cquery docs](/query/cquery) for guidance on using `somepath` to get the right
 one.
 
 Caution: To prevent restarting the Bazel server, invoke `bazel config` with the
diff --git a/site/en/docs/external.md b/site/en/docs/external.md
index 80fcf56..8e34064 100644
--- a/site/en/docs/external.md
+++ b/site/en/docs/external.md
@@ -10,7 +10,7 @@
 
 Note: Bazel 5.0 and newer has a new external dependency system, codenamed
 "Bzlmod", which renders a lot of the content on this page obsolete. See [Bzlmod
-user guide](/docs/bzlmod) for more information.
+user guide](/build/bzlmod) for more information.
 
 The `WORKSPACE` file (or `WORKSPACE.bazel` file) in the
 [workspace directory](/concepts/build-ref#workspace)
@@ -257,7 +257,7 @@
 * Use `--host_jvm_args=-Djava.net.preferIPv6Addresses=true`
   [startup option](/docs/user-manual#startup-options),
   for example by adding the following line in your
-  [`.bazelrc` file](/docs/bazelrc):
+  [`.bazelrc` file](/run/bazelrc):
 
   `startup --host_jvm_args=-Djava.net.preferIPv6Addresses=true`
 
@@ -265,7 +265,7 @@
   as well (integration tests sometimes needs that), also use
   `--jvmopt=-Djava.net.preferIPv6Addresses=true`
   [tool flag](/docs/user-manual#jvmopt), for example by having the
-  following line in your [`.bazelrc` file](/docs/bazelrc):
+  following line in your [`.bazelrc` file](/run/bazelrc):
 
   `build --jvmopt=-Djava.net.preferIPv6Addresses`
 
@@ -361,7 +361,7 @@
   into Bazel and has no system dependencies.
 * `http_archive` supports a list of `urls` as mirrors, and `git_repository` supports only
   a single `remote`.
-* `http_archive` works with the [repository cache](/docs/build#repository-cache), but not
+* `http_archive` works with the [repository cache](/run/build#repository-cache), but not
   `git_repository`. See
    [#5116](https://github.com/bazelbuild/bazel/issues/5116){: .external} for more information.
 
diff --git a/site/en/docs/user-manual.md b/site/en/docs/user-manual.md
index 37a06d0..647eb8b 100644
--- a/site/en/docs/user-manual.md
+++ b/site/en/docs/user-manual.md
@@ -7,13 +7,13 @@
 
 This page covers the options that are available with various Bazel commands,
 such as `bazel build`, `bazel run`, and `bazel test`. This page is a companion
-to the list of Bazel's commands in [Build with Bazel](/docs/build).
+to the list of Bazel's commands in [Build with Bazel](/run/build).
 
 ## Target syntax {:#target-syntax}
 
 Some commands, like `build` or `test`, can operate on a list of targets. They
 use a syntax more flexible than labels, which is documented in
-[Specifying targets to build](/docs/build#specifying-build-targets).
+[Specifying targets to build](/run/build#specifying-build-targets).
 
 ## Options {:#build-options}
 
@@ -62,7 +62,7 @@
     `/home/bob/clients/bob_client/bazel/foo` directory.
 
 If you use a non-default package path, specify it in your
-[Bazel configuration file](/docs/bazelrc) for convenience.
+[Bazel configuration file](/run/bazelrc) for convenience.
 
 _Bazel doesn't require any packages to be in the
 current directory_, so you can do a build from an empty bazel
@@ -455,7 +455,7 @@
 #### `--experimental_action_listener={{ "<var>" }}label{{ "</var>" }}` {:#experimental-action-listener}
 
 Warning: Extra actions are deprecated. Use
-[aspects](/rules/aspects)
+[aspects](/extending/aspects)
 instead.
 
 The `experimental_action_listener` option instructs Bazel to use
@@ -465,7 +465,7 @@
 #### `--[no]experimental_extra_action_top_level_only` {:experimental-extra-action-top-level-only}
 
 Warning: Extra actions are deprecated. Use
-[aspects](/rules/aspects) instead.
+[aspects](/extending/aspects) instead.
 
 If this option is set to true, extra actions specified by the
 [ `--experimental_action_listener`](#experimental-action-listener) command
@@ -474,7 +474,7 @@
 #### `--experimental_extra_action_filter={{ "<var>" }}regex{{ "</var>" }}` {:#experimental-extra-action-filter}
 
 Warning: Extra actions are deprecated. Use
-[aspects](/rules/aspects) instead.
+[aspects](/extending/aspects) instead.
 
 The `experimental_extra_action_filter` option instructs Bazel to
 filter the set of targets to schedule `extra_actions` for.
@@ -829,7 +829,7 @@
 
 When this option is enabled, Bazel will discard the analysis cache
 right before execution starts, thus freeing up additional memory
-(around 10%) for the [execution phase](/docs/build#execution).
+(around 10%) for the [execution phase](/run/build#execution).
 The drawback is that further incremental builds will be slower. See also
 [memory-saving mode](/docs/memory-saving-mode).
 
@@ -1155,7 +1155,7 @@
 regression tests). In the former case, the result information is
 very useful whereas in the latter case it is less so. As with all
 options, this can be specified implicitly via
-the [`.bazelrc`](/docs/bazelrc) file.
+the [`.bazelrc`](/run/bazelrc) file.
 
 The files are printed so as to make it easy to copy and paste the
 filename to the shell, to run built executables. The "up-to-date"
@@ -1309,7 +1309,7 @@
 Use these options to control the host and target platforms that configure how builds work, and to
 control what execution platforms and toolchains are available to Bazel rules.
 
-Please see background information on [Platforms](/docs/platforms) and [Toolchains](/docs/toolchains).
+Please see background information on [Platforms](/extending/platforms) and [Toolchains](/extending/toolchains).
 
 #### `--platforms={{ "<var>" }}labels{{ "</var>" }}` {:#platforms}
 
@@ -1432,10 +1432,10 @@
 
 When using Bazel for release builds, the same issues arise as for other scripts
 that perform a build. For more details, see
-[Call Bazel from scripts](/docs/scripts). In particular, the following options
+[Call Bazel from scripts](/run/scripts). In particular, the following options
 are strongly recommended:
 
-*   [`--bazelrc=/dev/null`](/docs/bazelrc)
+*   [`--bazelrc=/dev/null`](/run/bazelrc)
 *   [`--nokeep_state_after_build`](/reference/command-line-reference#flag--keep_state_after_build)
 
 These options are also important:
@@ -1708,7 +1708,7 @@
 #### Other options for `bazel test` {:#bazel-test-other-options}
 
 The syntax and the remaining options are exactly like
-[`bazel build`](/docs/build).
+[`bazel build`](/run/build).
 
 ## Running executables {:#running-executables}
 
@@ -1841,14 +1841,14 @@
 Bazel includes a query language for asking questions about the
 dependency graph used during the build. The query language is used
 by two commands: query and cquery. The major difference between the
-two commands is that query runs after the [loading phase](/docs/build#loading)
-and cquery runs after the [analysis phase](/docs/build#analysis). These tools are an
+two commands is that query runs after the [loading phase](/run/build#loading)
+and cquery runs after the [analysis phase](/run/build#analysis). These tools are an
 invaluable aid to many software engineering tasks.
 
 The query language is based on the idea of
 algebraic operations over graphs; it is documented in detail in
 
-[Bazel Query Reference](/reference/query).
+[Bazel Query Reference](/query/language).
 Please refer to that document for reference, for
 examples, and for query-specific command-line options.
 
@@ -1901,7 +1901,7 @@
 
 The `help` command provides on-line help. By default, it
 shows a summary of available commands and help topics, as shown in
-[Building with Bazel](/docs/build#quickstart).
+[Building with Bazel](/run/build#quickstart).
 Specifying an argument displays detailed help for a particular
 topic. Most topics are Bazel commands, such as `build`
 or `query`, but there are some additional help topics
@@ -1920,7 +1920,7 @@
 command. This command causes the Bazel server to exit as soon as it
 becomes idle (for example, after the completion of any builds or other
 commands that are currently in progress). For more details, see
-[Client/server implementation](/docs/client-server).
+[Client/server implementation](/run/client-server).
 
 Bazel servers stop themselves after an idle timeout, so this command
 is rarely necessary; however, it can be useful in scripts when it is
@@ -2383,7 +2383,7 @@
 #### `--batch` {:#batch}
 
 Batch mode causes Bazel to not use the
-[standard client/server mode](/docs/client-server), but instead runs a bazel
+[standard client/server mode](/run/client-server), but instead runs a bazel
 java process for a single command, which has been used for more predictable
 semantics with respect to signal handling, job control, and environment
 variable inheritance, and is necessary for running bazel in a chroot jail.
@@ -2489,7 +2489,7 @@
 #### `--config={{ "<var>" }}name{{ "</var>" }}` {:#config}
 
 Selects additional config section from
-[the rc files](/docs/bazelrc#bazelrc-file-locations); for the current `command`,
+[the rc files](/run/bazelrc#bazelrc-file-locations); for the current `command`,
 it also pulls in the options from `command:name` if such a section exists. Can be
 specified multiple times to add flags from several config sections. Expansions can refer to other
 definitions (for example, expansions can be chained).