aboutsummaryrefslogtreecommitdiff
path: root/www/.htaccess
diff options
context:
space:
mode:
Diffstat (limited to 'www/.htaccess')
-rw-r--r--www/.htaccess40
1 files changed, 40 insertions, 0 deletions
diff --git a/www/.htaccess b/www/.htaccess
new file mode 100644
index 0000000..5799444
--- /dev/null
+++ b/www/.htaccess
@@ -0,0 +1,40 @@
+#####################################
+# the first part of this file is used if you configure your scuttle for nice urls
+# (see $cleanurls in config.inc.php)
+#####################################
+
+# See https://stackoverflow.com/questions/4558629/mod-rewrite-not-behaving-nicely
+# http://www.bennadel.com/blog/2218-Negotiation-Discovered-File-s-Matching-Request-None-Could-Be-Negotiated.htm
+# https://httpd.apache.org/docs/current/content-negotiation.html
+Options -MultiViews +FollowSymLinks
+
+# Rewrite clean URLs onto real files
+<IfModule mod_rewrite.c>
+Options +FollowSymlinks
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME}.php -f
+RewriteRule ^([^/.]+)/?(.*)$ /$1.php/$2 [QSA,L]
+RewriteRule ^api/([a-z]+)/([a-z]+) /api/$1_$2.php
+</IfModule>
+
+
+#####################################
+# This second part is used to speed-up the application
+#####################################
+
+<IfModule mod_expires.c>
+ExpiresActive On
+
+ExpiresByType image/ico "access plus 15 days"
+ExpiresByType image/png "access plus 15 days"
+ExpiresByType image/gif "access plus 15 days"
+ExpiresByType text/js "access plus 15 days"
+ExpiresByType text/css "access plus 15 days"
+</IfModule>
+
+
+<IfModule mod_deflate.c>
+#<FilesMatch "\.(js|css)$">
+SetOutputFilter DEFLATE
+#</FilesMatch>
+</IfModule>