Files
superset2/docs/static/.htaccess
2026-06-29 14:57:06 -07:00

74 lines
4.8 KiB
ApacheConf

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://superset.apache.org/$1 [R,L]
RewriteCond %{HTTP_HOST} ^superset.incubator.apache.org$ [NC]
RewriteRule ^(.*)$ https://superset.apache.org/$1 [R=301,L]
# CSP permissions for superset.apache.org
# Additional domains required for docs site functionality:
# - widget.kapa.ai: AI chatbot widget (uses Google reCAPTCHA). Approval here: https://privacy.apache.org/faq/committers.html
# - *.googleapis.com, *.google.com, *.gstatic.com: Google Calendar embed, kapa.ai reCAPTCHA - all of these loaded with user consent, following policy laid out in https://privacy.apache.org/faq/committers.html
# - github.com, *.github.com, *.githubusercontent.com: GitHub user-attachment images in docs (apex github.com serves user-attachments/* assets). Discussed/resolved in this thread: https://issues.apache.org/jira/browse/INFRA-25701?filter=-2 (DPA in place with GitHub)
# - *.algolia.net, *.algolianet.com: Algolia DocSearch. Approved here: https://privacy.apache.org/faq/committers.html
# See: https://infra.apache.org/tools/csp.html
SetEnv CSP_PROJECT_DOMAINS "widget.kapa.ai https://*.googleapis.com/ https://*.google.com/ https://*.gstatic.com/ https://github.com/ https://*.github.com/ https://*.githubusercontent.com/ https://*.algolia.net/ https://*.algolianet.com/"
# REDIRECTS
RewriteEngine On
RewriteRule ^installation\.html$ /docs/installation/docker-compose [R=301,L]
RewriteRule ^tutorials\.html$ /docs/intro [R=301,L]
RewriteRule ^admintutorial\.html$ /docs/using-superset/creating-your-first-dashboard [R=301,L]
RewriteRule ^usertutorial\.html$ /docs/using-superset/creating-your-first-dashboard [R=301,L]
RewriteRule ^security\.html$ /docs/security/ [R=301,L]
RewriteRule ^sqllab\.html$ /docs/configuration/sql-templating [R=301,L]
RewriteRule ^gallery\.html$ /docs/intro [R=301,L]
RewriteRule ^druid\.html$ /docs/databases [R=301,L]
RewriteRule ^misc\.html$ /docs/configuration/country-map-tools [R=301,L]
RewriteRule ^visualization\.html$ /docs/configuration/country-map-tools [R=301,L]
RewriteRule ^videos\.html$ /docs/faq [R=301,L]
RewriteRule ^faq\.html$ /docs/faq [R=301,L]
RewriteRule ^tutorial\.html$ /docs/using-superset/creating-your-first-dashboard [R=301,L]
RewriteRule ^docs/creating-charts-dashboards/first-dashboard$ /docs/using-superset/creating-your-first-dashboard [R=301,L]
RewriteRule ^docs/rest-api$ /docs/api [R=301,L]
RewriteRule ^docs/installation/email-reports$ /docs/configuration/alerts-reports [R=301,L]
RewriteRule ^docs/roadmap$ /docs/intro [R=301,L]
RewriteRule ^docs/contributing/contribution-guidelines$ /docs/contributing/ [R=301,L]
RewriteRule ^docs/contributing/contribution-page$ /docs/contributing/ [R=301,L]
RewriteRule ^docs/databases/yugabyte/$ /docs/databases [R=301,L]
RewriteRule ^docs/frequently-asked-questions$ /docs/faq [R=301,L]
RewriteRule ^docs/installation/running-on-kubernetes/$ /docs/installation/kubernetes [R=301,L]
RewriteRule ^docs/contributing/testing-locally/$ /docs/contributing/howtos [R=301,L]
RewriteRule ^docs/creating-charts-dashboards/creating-your-first-dashboard/$ /docs/using-superset/creating-your-first-dashboard [R=301,L]
RewriteRule ^docs/creating-charts-dashboards/exploring-data/$ /docs/using-superset/creating-your-first-dashboard [R=301,L]
RewriteRule ^docs/installation/installing-superset-using-docker-compose/$ /docs/installation/docker-compose [R=301,L]
RewriteRule ^docs/contributing/creating-viz-plugins/$ /docs/contributing/howtos [R=301,L]
RewriteRule ^docs/installation/$ /docs/installation/kubernetes [R=301,L]
RewriteRule ^docs/installation/installing-superset-from-pypi/$ /docs/installation/pypi [R=301,L]
RewriteRule ^docs/installation/configuring-superset/$ /docs/configuration/configuring-superset [R=301,L]
RewriteRule ^docs/installation/cache/$ /docs/configuration/cache [R=301,L]
RewriteRule ^docs/installation/async-queries-celery/$ /docs/configuration/async-queries-celery [R=301,L]
RewriteRule ^docs/installation/event-logging/$ /docs/configuration/event-logging [R=301,L]
# pre-commit hooks documentation
RewriteRule ^docs/contributing/hooks-and-linting/$ /docs/contributing/development/#git-hooks-1