mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-05 15:31:14 +00:00
chore: update 404 page
This commit is contained in:
7
404.html
7
404.html
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
// Check if the current path is versioned, if not, redirect to the default versioned path
|
// Check if the current path is versioned, if not, redirect to the default versioned path
|
||||||
const versions = [ "stable"]
|
const versions = ["stable"]
|
||||||
const defaultVersion = "stable"
|
const defaultVersion = "stable"
|
||||||
const basePath = "/freqtrade/en"
|
const basePath = "freqtrade/en/"
|
||||||
const targetRedirectPath = "404" // path to redirect to, relative to basePath
|
const targetRedirectPath = "404" // path to redirect to, relative to basePath
|
||||||
|
|
||||||
// if path starts with version, redirect to versioned 404
|
// if path starts with version, redirect to versioned 404
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
// Replace it in href, so we keep hashes and query params
|
// Replace it in href, so we keep hashes and query params
|
||||||
// Only replace first occurence of basePath
|
// Only replace first occurence of basePath
|
||||||
if (!foundVersion){
|
if (!foundVersion){
|
||||||
window.location.href = window.location.href.replace(basePath, `${basePath}/${defaultVersion}`)
|
//window.location.href = window.location.href.replace(basePath, `${basePath}/${defaultVersion}`)
|
||||||
|
window.location.href = `https://${window.location.hostname}/${basePath}/${defaultVersion}`
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user