Skip to content

Commit

Permalink
hehe funny
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderp25 committed Nov 28, 2022
1 parent cf94915 commit 1a01dcb
Show file tree
Hide file tree
Showing 3 changed files with 728 additions and 6 deletions.
32 changes: 26 additions & 6 deletions pages/l.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
// import { Redirect } from "next";
export async function getServerSideProps({ req }) {
let isBot = (req
? req.headers['user-agent']
: navigator.userAgent).match(
/Discordbot|Twitterbot|facebookexternalhit/i
)

if (isBot) {
return {
redirect: {
destination: '/',
permanent: false,
},
}
} else {
return {
redirect: {
destination: 'https://youtu.be/dQw4w9WgXcQ',
permanent: false,
},
}
}
}

export default function RickRoll(){
return (
<>
{/* Insert redirect stuff here or smth */}
</>
);
return(
<p>hi</p>
)
}
Loading

0 comments on commit 1a01dcb

Please sign in to comment.