diff --git a/README.md b/README.md index 2255ca6..1784a3c 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,9 @@ Please be aware that for this router you need a basic understanding of PHP. Many * Basic understanding of RegExp in PHP: https://www.guru99.com/php-regular-expressions.html * Basic understanding of anonymous functions and how to push data inside it: https://www.php.net/manual/en/functions.anonymous.php * Basic understanding of including and requiring files and how to push data to them: https://stackoverflow.com/questions/4315271/how-to-pass-arguments-to-an-included-file/5503326 +* Windows Only - Setup IIS and PHP: https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php. +* Windows Only - Creating Websites in IIS: https://docs.microsoft.com/en-us/iis/get-started/getting-started-with-iis/create-a-web-site. + Please note that we are happy to help you if you have problems with this router. Unfortunately, we don't have a lot of time, so we can't help you learn PHP basics. @@ -88,12 +91,21 @@ I have created a little Docker test setup. 3. Open your browser and navigate to http://localhost -## Themes, layouts, pages and components -If you are interested in some basic concepts on how to build a simple PHP page using this router including themes, layouts, pages and components checkout this repo: https://github.com/steampixel/simplePHPPages -This project will give you some ideas and basics on how to get started without any dependencies. +## Test Setup in Windows using IIS +With IIS now fully supporting PHP, this example can be run using the included web.config. The web.config has a rewrite rule, similar to the .htaccess rewrite rule, but specifically for IIS. The rewrite rule will send all incoming requests to index.php in your root. The rest is done by the simple php router. +### Setup +_This setup tutorial assumes you have the knowledge to create sites in IIS and set up bindings for http/https and custom DNS. If you need more information, this [article](https://docs.microsoft.com/en-us/iis/get-started/getting-started-with-iis/create-a-web-site) will help you with that part._ +1. If you haven't done so yet, install php on windows. This article [Install IIS and PHP | Microsoft Docs ](https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php) will guide you to install the required php dependencies on your windows machine. +2. In IIS Manager, create a site and point the physical location to root of the simplePHPRouter folder. It is recommended you connect to the the physical location with an account that has "Read/Write" rights to that folder. +3. (Optional) Create a DNS entry in your hosts file pointing 127.0.0.1 to the domain name you have used to set up the site. +4. Browse to the newly created website and the sample site should display now. ## Todo * Create demo configuration for nginx +## Themes, layouts, pages and components +If you are interested in some basic concepts on how to build a simple PHP page using this router including themes, layouts, pages and components checkout this repo: https://github.com/steampixel/simplePHPPages +This project will give you some ideas and basics on how to get started without any dependencies. + ## License This project is licensed under the MIT License. See LICENSE for further information. diff --git a/web.config b/web.config new file mode 100644 index 0000000..96879bd --- /dev/null +++ b/web.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +