This project is a simple URL redirector built with Next.js. It uses a JSON file to store redirection mappings, making it lightweight and easy to maintain.
- The app reads a
redirects.json
file that contains URL mappings. - When a user visits
guliveer.github.io/r/example
, they are redirected to the corresponding URL (e.g.,https://example.com
). - If a redirection target is not found, the user is redirected to the default URL.
- A fallback message is displayed with a hyperlink in case the redirect fails.
Modify the redirects.json
file to add new redirects.
It also supports nested paths for better organization and readability.
// Example
{
"default": "https://github.com/Guliveer/r", // (optional)
"github": "https://github.com/Guliveer", // -> website.com/github
"linkedin": "https://linkedin.com/in/oliwer-pawelski/", // -> website.com/linkedin
"nested-example": {
"subpage": "https://example.com/", // -> website.com/nested-example/subpage
"subpage2": "https://example.com/" // -> website.com/nested-example/subpage2
}
}
Made by Oliwer Pawelski // Guliveer 🚀