Skip to content

Instantly share code, notes, and snippets.

@kb10uy
Created September 19, 2017 08:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kb10uy/4a4804e2d3a0fa35f2c93b81a0931e66 to your computer and use it in GitHub Desktop.
Save kb10uy/4a4804e2d3a0fa35f2c93b81a0931e66 to your computer and use it in GitHub Desktop.
mpywd - Homo Redirect FCGI
/* compile: gcc -o mpywd -lfcgi mpywd.c */
#include <stdio.h>
#include <fcgi_config.h>
#include <fcgi_stdio.h>
int main(void) {
while (FCGI_Accept() >= 0) {
printf("Content-Type: text/html\n");
printf("Status: 302 Found\n");
printf("Location: https://twitter.com/mpyw\n");
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment