JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
.htaccess works without knowing URL's pathname
[wfpl.git] / metaform / htaccess
index acd597b..317f925 100644 (file)
@@ -5,7 +5,26 @@ php_flag magic_quotes_gpc off
 # All your files are UTF-8... RIGHT?
 AddDefaultCharset UTF-8
 
-############ START OF PRETTY URLS SETTINGS
+# You should rename your images and css files when you change them so they can
+# be cached forever
+<FilesMatch "\.(css|less|jpg|png)$">
+       ExpiresActive On
+       ExpiresDefault A31536000
+</FilesMatch>
+
+# the following line makes it so you can just update the link to your
+# stylesheet without actually renaming it all the time. This is needed even if
+# you don't set a long cache period on stylesheets, because Safari will check
+# for a new html, but not check for a new css.
+RewriteRule    ^style_[0-9]*.less$  /style.less [L]
+
+
+# To enable larger uploads, you'll need both of these:
+# php_value post_max_size 205M
+# php_value upload_max_filesize 200M
+
+
+############ START OF PRETTY URLS SETTINGS ############
 # This section contains directives to enable pretty URLs, and instruct apache
 # to run wfpl on them. This runs code/config.php if it exists, then loads
 # templates, then loads the php file, and call's it's main function. See
@@ -23,9 +42,9 @@ RewriteEngine  on
 # Unfortunately, the rewrite rules only work with absolute paths, so if your
 # files are not at the top level of the domain, you'll have to customize this
 # part. Here's the config for running at the top level:
-RewriteRule    ^[^/.]*$  /run.php
+RewriteRule    ^[^/.]*$  ./run.php
 
 # use this line instead if you have this (.htaccess) file and your php and html
 # files in the ~form~ directory:
 #RewriteRule    ^[^/.]*$  /~form~/run.php
-############ END OF PRETTY URLS SETTINGS
+############ END OF PRETTY URLS SETTINGS ############