Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (35 sloc) 1.459 kB
# Instant Picture Creator
# .htaccess
#
# @author Michael Haschke @ eye48.com
# @version $Id: $
# please replace every '/path/to/instantpicture.php' by
# the location of instantpicture.php on your server
# what image type are wrapped by Instant Picture
# Example: <FilesMatch "\.(png|PNG)"> (only for Portable Network Graphics) )
<FilesMatch "\.(gif|jpg|jpeg|png|GIF|JPG|JPEG|PNG)">
<IfModule mod_rewrite.c>
# try to use Apache's Rewrite module
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . /path/to/instantpicture.php?picture=%{REQUEST_URI}?%{QUERY_STRING}
</IfModule>
<IfModule !mod_rewrite.c>
# Rewrite module is not available, fallback to AddType/AddHandler and Action
<IfModule mod_mime.c>
<IfModule mod_actions.c>
AddType application/x-httpd-parse .jpg .JPG .jpeg .JPEG .gif .GIF .png .PNG
# sometimes AddType don't work but AddHandler does
# in this case uncomment the AddHandler line and comment out the AddType line
#AddHandler application/x-httpd-parse .jpg .JPG .jpeg .JPEG .gif .GIF .png .PNG
Action application/x-httpd-parse "/path/to/instantpicture.php?picture="
</IfModule>
</IfModule>
<IfModule !mod_mime.c>
# neither Rewrite nor AddType/Action works, fallback to Redirect (Apache's Alias module)
<IfModule mod_alias.c>
RedirectMatch temp "^(.*)$" http://yourserver.com/path/to/instantpicture.php$1
</IfModule>
</IfModule>
</IfModule>
</FilesMatch>
Jump to Line
Something went wrong with that request. Please try again.