8000 GitHub - TrillAstro/redirecturl: This is dedicated to the creation of a redirect url with Github
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TrillAstro/redirecturl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

redirecturl

This is dedicated to the creation of a redirect url with Github

# Redirect URL Repository

This repository is designed to create a simple redirect URL using GitHub Pages. By hosting an HTML file on GitHub Pages, you can redirect users to any specified destination URL.

## How to Set Up the Redirect

1. **Clone the Repository**:
   ```sh
   git clone https://github.com/yourusername/redirect-url.git
   cd redirect-url
  1. Edit the index.html File:

    • Open index.html in your favorite text editor.
    • Replace https://yourdestinationurl.com with the URL you want to redirect to.
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="refresh" content="0;url=https://yourdestinationurl.com">
        <title>Redirecting...</title>
    </head>
    <body>
        <p>If you are not redirected, <a href="https://yourdestinationurl.com">click here</a>.</p>
    </body>
    </html>
  2. Commit and Push Changes:

    git add index.html
    git commit -m "Set up redirect URL"
    git push origin main
  3. Enable GitHub Pages:

    • Go to your repository settings on GitHub.
    • Scroll down to the "GitHub Pages" section.
    • Under "Source," select the main branch and click "Save".
    • GitHub Pages will provide a URL for your site, typically https://yourusername.github.io/redirect-url.
  4. Access the Redirect URL:

    • Navigate to the GitHub Pages URL provided (e.g., https://yourusername.github.io/redirect-url).
    • This URL will now redirect to the destination URL you specified in the index.html file.

Example

If you want to redirect to https://www.example.com, your index.html file should look like this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="0;url=https://www.example.com">
    <title>Redirecting...</title>
</head>
<body>
    <p>If you are not redirected, <a href="https://www.example.com">click here</a>.</p>
</body>
</html>

Benefits and Use Cases

  • Custom Short URLs: Create custom short URLs for your projects.
  • Marketing Campaigns: Track the effectiveness of different URLs by creating multiple repositories with different redirect URLs.
  • Documentation and Help Pages: Provide easy-to-remember URLs for documentation or help resources.

License

This project is licensed under the GNU License - see the LICENSE file for details.


Feel free to customize this README file to fit your specific needs and preferences.


This README file provides clear instructions on how to set up and use the redirect URL repository. It covers cloning the repository, editing the `index.html` file, committing and pushing changes, enabling GitHub Pages, and accessing the redirect URL.

About

This is dedicated to the creation of a redirect url with Github

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0