A url shortener in php with a sqlite database https://nunofcguerreiro.com

Nuno F. C. Guerreiro 7fe0d32023 Update 'README.md' 1 year ago
LICENSE 5ec44ce65b Initial commit 1 year ago
README.md 7fe0d32023 Update 'README.md' 1 year ago
config.php db8a83ebd2 Enviar ficheiros para '' 1 year ago
decoder.php fe8dc4bb7d Update 'decoder.php' 1 year ago
index.php 6ad5692157 Add 'index.php' 1 year ago
shorten.php f172d2c19a Update 'shorten.php' 1 year ago
urls.sql 73290b4c1f Adicionar 'urls.sql' 1 year ago

README.md

Php Sqlite Url Shortener

Simple url shortener in php with a sqlite database

For Apache add to .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ decoder.php?q=$1 [QSA,L]

For Nginx, add to your server block:

server {
    location / {
        rewrite ^/(.*)$ /decoder.php?q=$1;
    }
}