Configure redirects for a Datasette instance
Project description
datasette-redirects
Configure redirects for a Datasette instance
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-redirects
Usage
Configure redirects in your datasette.yaml configuration file. Redirects are organized by HTTP status code:
plugins:
datasette-redirects:
301:
old-page: https://example.com/new-page
another-old-page: /new-location
302:
temporary-page: /temporary-location
This configuration will:
- Redirect
/old-pagetohttps://example.com/new-pagewith a 301 (permanent) status - Redirect
/another-old-pageto/new-locationwith a 301 status - Redirect
/temporary-pageto/temporary-locationwith a 302 (temporary) status
Both /path and /path/ variants are matched automatically - you don't need to configure both.
Development
To set up this plugin locally, first checkout the code. You can confirm it is available like this:
cd datasette-redirects
# Confirm the plugin is visible
uv run datasette plugins
To run the tests:
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette_redirects-0.1.tar.gz.
File metadata
- Download URL: datasette_redirects-0.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
738b95de3cfec86859e0232e0878909587945b305753d6befc0745b36d2a8045
|
|
| MD5 |
533441018e4be351785cb17bc1db4bfd
|
|
| BLAKE2b-256 |
c855edc33646fe06bc57bc07773125bf3024a3801b7214cff57073e85312f6a7
|
Provenance
The following attestation bundles were made for datasette_redirects-0.1.tar.gz:
Publisher:
publish.yml on datasette/datasette-redirects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_redirects-0.1.tar.gz -
Subject digest:
738b95de3cfec86859e0232e0878909587945b305753d6befc0745b36d2a8045 - Sigstore transparency entry: 737686606
- Sigstore integration time:
-
Permalink:
datasette/datasette-redirects@6a9202aa51e16b17d0b3c4d8478bfb68a22b18cc -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a9202aa51e16b17d0b3c4d8478bfb68a22b18cc -
Trigger Event:
release
-
Statement type:
File details
Details for the file datasette_redirects-0.1-py3-none-any.whl.
File metadata
- Download URL: datasette_redirects-0.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c493ebe2ba27d294f3e1100b103f4213abebc2d9f2650444db964353a149772c
|
|
| MD5 |
1955aa7f33d13bbe3dd4033aee2aee87
|
|
| BLAKE2b-256 |
a0d0963cb4683f3657964471f6e1a81b22621199a374493e711902c357f7d0e8
|
Provenance
The following attestation bundles were made for datasette_redirects-0.1-py3-none-any.whl:
Publisher:
publish.yml on datasette/datasette-redirects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_redirects-0.1-py3-none-any.whl -
Subject digest:
c493ebe2ba27d294f3e1100b103f4213abebc2d9f2650444db964353a149772c - Sigstore transparency entry: 737686611
- Sigstore integration time:
-
Permalink:
datasette/datasette-redirects@6a9202aa51e16b17d0b3c4d8478bfb68a22b18cc -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a9202aa51e16b17d0b3c4d8478bfb68a22b18cc -
Trigger Event:
release
-
Statement type: