live host - sye.lol
I made a button that takes you to profile.html with an ID that was inputted and everything works great besides the ugly params, the url currently looks like this “sye.lol/profile.html?id=208168562286788610” but my goal is to get “sye.lol/208168562286788610”. I added this for my _redirects but nothing
/:discordID /profile.html?id=:discordID 200
here is my javascript
submitButton.addEventListener('click', async function() {
const discordId = discordInput.value.trim();
if (discordId !== '') {
const servercheck = await fetch(`https://api.lanyard.rest/v1/users/${discordId}`)
const requestdata = await servercheck.json()
if (requestdata.success === false) {
body.classList.add('animate-fade-out');
setTimeout(() => {
window.location.href = 'error.html'; e
}, 1000);
return;
}
body.classList.add('animate-fade-out');
setTimeout(() => {
window.location.href = `profile.html?id=${discordId}`;
}, 1000);
}
});