WillyJimmyDev / simple-quiz

A simple quiz administration written in PHP with a MySQL backend. Uses Bootstrap 3 and Slim PHP micro framework
http://elanman.com/simple-quiz/
Apache License 2.0
164 stars 73 forks source link

Rewrite rules for IIS #21

Closed ktos closed 8 years ago

ktos commented 8 years ago

You mention ISAPI_Rewrite in your readme, however there is official URL Rewrite module already available in newer IIS, which is IMO better (mostly because it's 100% free), however does not parse .htaccess files directly.

I have imported rules from .htaccess to web.config file for IIS, and also changed documentation to mention URL Rewrite for IIS instead of ISAPI_Rewrite.

Have some relation with #14.

WillyJimmyDev commented 8 years ago

Thanks very much ktos

damickp commented 8 years ago

Every link from the main page results in the message 404? - rewrite is working properly. example: public/categories/2 public/quiz/6 What is the reason?

ktos commented 8 years ago

Your website's "physical path" should point to /public, not to main directory. So links will be like http://localhost/quiz/6, not http://localhost/public/quiz/6. It is desirable for security reasons, means no data other that application's images, scripts and so on is available from the Internet.

If you do not want to make it this way, move web.config to main directory and change index.php in line 11 to public/index.php, will work.

I double-checked this few times, works for me using IIS 10.0 on Windows 10.