Merge pull request #909 from sgvictorino/tent-redirect-music-path
Redirect Bandcamp /music to Tent artist page
This commit is contained in:
commit
1e53685d4e
|
@ -367,7 +367,7 @@ function rewrite(url, frontend, randomInstance) {
|
||||||
if (url.hostname.endsWith('bandcamp.com')) {
|
if (url.hostname.endsWith('bandcamp.com')) {
|
||||||
const regex = /^(.*)\.bandcamp\.com/.exec(url.hostname)
|
const regex = /^(.*)\.bandcamp\.com/.exec(url.hostname)
|
||||||
const artist = regex[1]
|
const artist = regex[1]
|
||||||
if (url.pathname == '/') {
|
if (url.pathname == '/' || url.pathname == '/music') {
|
||||||
return `${randomInstance}/artist.php?name=${artist}`
|
return `${randomInstance}/artist.php?name=${artist}`
|
||||||
} else {
|
} else {
|
||||||
const regex = /^\/(.*)\/(.*)/.exec(url.pathname)
|
const regex = /^\/(.*)\/(.*)/.exec(url.pathname)
|
||||||
|
|
Loading…
Reference in New Issue