htaccess setup

This commit is contained in:
Chris Smith
2019-03-04 12:24:43 -06:00
parent 186af37211
commit 0a3c0fef1e
2 changed files with 27 additions and 1 deletions

5
.htaccess Normal file
View File

@@ -0,0 +1,5 @@
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-l
RewriteRule ^(.*)$ index.php/$1

View File

@@ -2,3 +2,24 @@
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.
## 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
```