Skip to content

Commit

Permalink
Merge pull request #315 from skipperbent/v3-development
Browse files Browse the repository at this point in the history
Version 3.4.5.5
  • Loading branch information
skipperbent committed Nov 25, 2017
2 parents 1fd13ed + f2819f8 commit 496d3e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,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

Expand Down
2 changes: 1 addition & 1 deletion src/Pecee/SimpleRouter/SimpleRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ protected static function addDefaultNamespace(IRoute $route)
$callback = $route->getCallback();

/* Only add default namespace on relative callbacks */
if ($callback === null || $callback[0] !== '\\') {
if ($callback === null || (is_string($callback) === true && $callback[0] !== '\\')) {

$namespace = static::$defaultNamespace;

Expand Down

0 comments on commit 496d3e7

Please sign in to comment.