Skip to content

Adapt for NGINX #21

@SteffeyDev

Description

@SteffeyDev

Its not that difficult to figure out, but it would be awesome if the README described how this works with NGINX as well. Basically all you need to do is put these lines in your site's file in /etc/nginx/sites-enabled:

autoindex off;
location /shorten {
rewrite ^/shorten/(.*)$ /location/of/shorten.php?longurl=$1 break;
}

location / {
# there should be things in this block already, such as try_files
rewrite "^/([0-9a-zA-Z]{1,6})$" /location/of/redirect.php?url=$1 last;
}

And then assuming php works correctly, that should be it (after mysql is set up)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions