FoOlRulez
Hover here to close
U
N
R
E
A
D
N
A
V
I
G
A
T
I
O
N
Blog
The blog where we announce every release, and give our very own breaking news about the world of scanlation and tech.
Forum
The mysteriously very active forum where we chill out and spam to our heart's desire, and share our good stuff.
FoOlChan
The place where only 18+ can enter, where all the scum of FoOlRulez is stored. You can come post anonymously any image.
IRC
The place where the cool kids in FoOlRulez hang, featuring trolls, doctors, translators and whatever we got in FoOls.
WebIRC
Just as above, but by clicking here you will open an IRC client into your browser, so you can chat anytime, anywhere.
aNi-N-gin
The weird anime recommendation system we coded, that will either give you childish cartoons or top level anime, not randomly.
Manga Reader
Where you can read our fresh manga, without going anywhere else and with very high quality.
Manga DDL
Manga Direct DownLoad. Nude and crude, the files at the highest possible quality, just a click away.
Blog | Forums | FoOlChan | IRC | WebIRC | Manga reader | Manga Direct Download
FoOlRulez is looking for more proofreaders! Follow this link for more information!
To hide almost all the advertisings and get direct downloads, login or register.
FoOlz.us and how to make YOURLS work with Nginx.
Posted: August 30, 2009 at 11:19 pm in FoOls/Randomness., Games/Informatics.. Tagged with: , , .
Written by woxxy - Bio:
The owner of this website, caretaker of the blog, unstoppable web developer, graphic editor and leader of the FoOlRulez scanlation team. And, most likely, younger than you are!

Twitter: http://twitter.com/woxxy

Sometimes I wonder… why do I do such things?

Well, honestly I am a megalomaniac, and all the most famous websites have an URL shortening service for their own service. Since (one day) FoOlRulez will be the biggest website evar, I thought… why not adding the short URL service early? Doing it was far harder than thinking of it.

You know, we aren’t using a LAMP (Linux-Apache-MySQL-PHP) server, but an Nginx powered server (LNMP sounds gay tho). This means most of the software needs some fix to work correctly, though it will work much faster. This means YOURLS, the software I intended to use, needed some fix as well.

For this fix, I had to find a solution, and I have found it here: 使用 Yourls 强化你的短网址系统 – Showfom’s Blog.
I have no idea what that URL says… but hey, I found the fix to make YOURLS work!

if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/([0-9a-z]+)/?$ /yourls-go.php?id=$1 last;
}

Gibberish? No this is the code you need to make it work in your Nginx installation! Paste it where you need it. If you don’t know how comment here and I’ll explain a bit further.

Anyway, this made everything work… a bit of styling of the homepage et voilà!

http://foolz.us

It works! I can’t believe it myself!

Let’s go a bit more indeep with YOURLS. This is a very complete script to make your own URL shortener, by:

I think they’re the same who made a few of the plugins I use in this Wordpress blog (yeah they are). Anyway, this script is powerful enough to not leave you dry mouthed: you get an API to use the URL shortening service on your server from anywhere, the admin menu lets you control the tidbits you need (ok, most of the controls are via code, but it’s easily done with the explanations), the code has explanation for most of the lines – I in fact edited it to fit my needs better.

Best part of all, it comes with a Wordpress plugin, that hooks to the shortening service and makes a short url for every post: even this one post has a shortening url. Then you get automatic submission of the post to Twitter after publishing. The button to submit to twitter on the top is my creation by using the functions (wordpress hooks) that YOURL for Wordpress provides.

  • Latest posts:

  • 17 Responses to “FoOlz.us and how to make YOURLS work with Nginx.”

    1. woxxy woxxy says:

      @gamerz @ozh Thanks for YOURLS =) “FoOlz.us and how to make YOURLS work with Nginx.” http://foolrulez.org/blog/2009/08/foolz-...
      via Twitoaster

    2. scizzer12 says:

      I love it woxxy.
      Keep up the good work.

    3. Nyarth says:

      The URL you linked above says “Use your short-Yourls enhanced web-based system – Showfom’s Blog.” /google translated =P

      So this is basically like Tinyurl/bit.ly huh?

    4. muge says:

      Oh hey, this is pretty cool.
      Once the database “registers” a custom keyword, does it expire after a while?
      Or is it permanently stored?

    5. M says:

      What? DickensUrl wasn’t good enough for you?

      FoOls: http://dickensurl.com/bf68/*an immensely long url*

    6. M says:

      Oh, shoot, I broke the blog. Sorry D:

    7. No Comment says:

      This is pretty cool.

    8. Showfom says:

      Haha so you use Nginx, too. I love it~

    9. Tom says:

      Ok, I don’t know where to put the code above. Please help. Thanks!

    10. [...] the site for YOURLS there’s a link for nginx rewrites however it has 3 [...]

    Leave a Reply

    Twitter Users
    Enter your personal information in the form or sign in with your Twitter account by clicking the button below.