Programming

Python - Redirector

Redirector App wrote a little redirector app and tought i will explain and share it here. it’s a bit like a url shortener, but you can define the “shortcut” of the URL. how does it work it basically consists of a Text File wir Redirection URL’s. redi.txt stoege,https://www.stoege.net blog,https://blog.stoege.net test,https://www.test.com Call it so, when you open a Browser and Request the URL: https://your.domain.de/blog, you get redirected to https://blog.stoege.net main.app from flask import Flask, redirect, request import datetime import os import random # Vars redirect_file="redi.