From 640e377ea9ebb774a70918d0c2316fa7510ecba5 Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Wed, 3 Dec 2014 16:02:08 +0100 Subject: [PATCH] Adding webroot/htaccess to show off how friendly urls can be created for img.php. Fix #45 --- webroot/htaccess | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 webroot/htaccess diff --git a/webroot/htaccess b/webroot/htaccess new file mode 100644 index 0000000..dc2ed00 --- /dev/null +++ b/webroot/htaccess @@ -0,0 +1,16 @@ +# +# Rewrite to have friendly urls to img.php, edit it to suite your environment. +# +# The example is set up as following. +# +# img A directory where all images are stored +# img/me.jpg Access a image as usually. +# img/img.php This is where I choose to place img.php (and img_config.php). +# image/me.jpg Access a image though img.php using htaccess rewrite. +# image/me.jpg?w=300 Using options to img.php. +# +# Subdirectories also work. +# img/me/me.jpg Direct access to the image. +# image/me/me.jpg Accessed through img.php. +# +RewriteRule ^image/(.*)$ img/img.php?src=$1 [QSA,NC,L]