diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..aa7a5f6 --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ +RewriteEngine on +RewriteCond %{SCRIPT_FILENAME} !-f +RewriteCond %{SCRIPT_FILENAME} !-d +RewriteCond %{SCRIPT_FILENAME} !-l +RewriteRule ^(.*)$ index.php/$1 \ No newline at end of file diff --git a/README.md b/README.md index 6271e53..5a098e2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,25 @@ # Dinner in the Woods Dinner in the Woods the premier event for [Nature's Classroom Institute of Wisconsin](https://discovernci.org). The repo -contains all the code necessary for running the ecommerce page for the event. \ No newline at end of file +contains all the code necessary for running the ecommerce page for the event. + +## Table of Contents +[Setting up Apache](#setting-up-apache) + +### Setting up Apache + +Nothing special is required for Apache to work. We've include the `.htaccess` file in the `public` folder. If rewriting is not working for you, please check that the `mod_rewrite` module (htaccess support) is enabled in the Apache configuration. + +#### .htaccess example + +Below is an example of an working `.htaccess` file used by simple-php-router. + +Simply create a new `.htaccess` file in your projects `public` directory and paste the contents below in your newly created file. This will redirect all requests to your `index.php` file (see Configuration section below). + +``` +RewriteEngine on +RewriteCond %{SCRIPT_FILENAME} !-f +RewriteCond %{SCRIPT_FILENAME} !-d +RewriteCond %{SCRIPT_FILENAME} !-l +RewriteRule ^(.*)$ index.php/$1 +```