JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
don't overwrite .centerer vmargin
[wfpl-cms.git] / .htaccess
1 php_value post_max_size 25M
2 php_value upload_max_filesize 20M
3 php_flag register_globals off
4 php_flag magic_quotes_gpc off
5 DirectorySlash Off
6 DirectoryIndex disabled
7 AddDefaultCharset UTF-8
8 AddCharset UTF-8 .css
9 RewriteEngine  on
10 RewriteRule ^[^/.]*$ /wfpl_main.php [L]
11
12 <FilesMatch "\.(css|jpg|png)$">
13         ExpiresActive On
14         ExpiresDefault A31536000
15 </FilesMatch>
16
17 # SECURITY: don't execute code on the server (exception below)
18 SetHandler none
19 SetHandler default-handler
20 # this option is needed for RewriteRule to work:
21 Options SymlinksIfOwnerMatch
22 php_flag engine off
23 RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo
24 # code execution exception: allow only /wfpl_main.php
25 # <Files> matches regardless of directory/path, so rewrite php in subdirs
26 RewriteRule ^(wfpl_main\.php|paypal_ipn\.php|cms_images_autoresize\.php)$  - [L]
27 RewriteRule .*\.php$ - [L,R=404]
28 <Files "wfpl_main.php">
29         php_flag engine on
30         SetHandler application/x-httpd-php
31 </Files>
32 <Files "paypal_ipn.php">
33         php_flag engine on
34         SetHandler application/x-httpd-php
35 </Files>
36 <Files "cms_images_autoresize.php">
37         php_flag engine on
38         SetHandler application/x-httpd-php
39 </Files>
40 RewriteCond %{REQUEST_FILENAME} !-f
41 RewriteRule ^cms_images/[0-9a-f]+w[0-9]+\.[pj][np]g$ /cms_images_autoresize.php