Merge branch 'v3-development' of github.com:skipperbent/simple-php-router into v3-optimisations

This commit is contained in:
Simon Sessingø
2017-11-26 17:38:49 +01:00
+13 -7
View File
@@ -236,17 +236,23 @@ Simply create a new `web.config` file in your projects `public` directory and pa
</configuration>
```
#### Troubleshoting
#### Troubleshooting
If you do not have a favicon.ico file in your project, you can get `404 Router::notFoundException()` constantly.
To add `favicon.ico` as exception, you can add this line to the `<conditions>` group:
```<add input="{REQUEST_FILENAME}" negate="true" pattern="favicon.ico" ignoreCase="true" />```
If you do not have a `favicon.ico` file in your project, you can get a `NotFoundHttpException` (404 - not found).
To add `favicon.ico` to the IIS ignore-list, add the following line to the `<conditions>` group:
```
<add input="{REQUEST_FILENAME}" negate="true" pattern="favicon.ico" ignoreCase="true" />
```
You can also make one exception for files with some extensions:
```<add input="{REQUEST_FILENAME}" pattern="\.ico|\.png|\.css|\.jpg" negate="true" ignoreCase="true" />```
```
<add input="{REQUEST_FILENAME}" pattern="\.ico|\.png|\.css|\.jpg" negate="true" ignoreCase="true" />
```
If you are using `$_SERVER['ORIG_PATH_INFO']`, you will get `\index.php\` as part of the returned value. By sample:
```/index.php/test/mypage.php```
If you are using `$_SERVER['ORIG_PATH_INFO']`, you will get `\index.php\` as part of the returned value. For example:
```
/index.php/test/mypage.php
```
### Configuration