X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=metaform%2Fhtaccess;h=acd597bc289d64001a5f41740d616781698ef003;hb=0f22285be7670c1fd4871bad7b9d4ea27e9c3fc8;hp=1e7df36154d1a29436232e47fb201b6ee161c5e6;hpb=81c4b7d584ff89d86e846e4e501d7a2f355aadfc;p=wfpl.git diff --git a/metaform/htaccess b/metaform/htaccess index 1e7df36..acd597b 100644 --- a/metaform/htaccess +++ b/metaform/htaccess @@ -1,4 +1,31 @@ +# Tell php not to mangle form data or let the user set globals. +php_flag register_globals off php_flag magic_quotes_gpc off + +# All your files are UTF-8... RIGHT? +AddDefaultCharset UTF-8 + +############ 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 +# code/wfpl/run.php and code/wfpl/README for more details. + +# To have "pretty" urls (no file extension at the end) we use mod_rewrite. But +# first we've got to disable a couple url-mangling features of apache that take +# precedence over mod_rewrite: +Options -MultiViews +DirectorySlash Off + +# Activate mod_rewrite: RewriteEngine on -RewriteRule ^$ /~form~/run.php -RewriteRule ^[^/]*\.html$ /~form~/run.php + +# 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 + +# 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