JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
.htaccess works without knowing URL's pathname
[wfpl.git] / metaform / htaccess
1 # Tell php not to mangle form data or let the user set globals.
2 php_flag register_globals off
3 php_flag magic_quotes_gpc off
4
5 # All your files are UTF-8... RIGHT?
6 AddDefaultCharset UTF-8
7
8 # You should rename your images and css files when you change them so they can
9 # be cached forever
10 <FilesMatch "\.(css|less|jpg|png)$">
11         ExpiresActive On
12         ExpiresDefault A31536000
13 </FilesMatch>
14
15 # the following line makes it so you can just update the link to your
16 # stylesheet without actually renaming it all the time. This is needed even if
17 # you don't set a long cache period on stylesheets, because Safari will check
18 # for a new html, but not check for a new css.
19 RewriteRule    ^style_[0-9]*.less$  /style.less [L]
20
21
22 # To enable larger uploads, you'll need both of these:
23 # php_value post_max_size 205M
24 # php_value upload_max_filesize 200M
25
26
27 ############ START OF PRETTY URLS SETTINGS ############
28 # This section contains directives to enable pretty URLs, and instruct apache
29 # to run wfpl on them. This runs code/config.php if it exists, then loads
30 # templates, then loads the php file, and call's it's main function. See
31 # code/wfpl/run.php and code/wfpl/README for more details.
32
33 # To have "pretty" urls (no file extension at the end) we use mod_rewrite. But
34 # first we've got to disable a couple url-mangling features of apache that take
35 # precedence over mod_rewrite:
36 Options -MultiViews
37 DirectorySlash Off
38
39 # Activate mod_rewrite:
40 RewriteEngine  on
41
42 # Unfortunately, the rewrite rules only work with absolute paths, so if your
43 # files are not at the top level of the domain, you'll have to customize this
44 # part. Here's the config for running at the top level:
45 RewriteRule    ^[^/.]*$  ./run.php
46
47 # use this line instead if you have this (.htaccess) file and your php and html
48 # files in the ~form~ directory:
49 #RewriteRule    ^[^/.]*$  /~form~/run.php
50 ############ END OF PRETTY URLS SETTINGS ############