Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyatkin committed Apr 10, 2016
1 parent 2ae88a2 commit a599fd0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Роутер Infrajs для .htaccess
**Disclaimer:** Module is not complete and not ready for use yet.

```
RewriteEngine on
Expand All @@ -8,7 +7,7 @@ RewriteRule ^(.*)$ vendor/infrajs/router/index.php [L,QSA]
```

Используется с другими расширениями [infrajs/controller](https://github.com/infrajs/controller), [infrajs/imager](https://github.com/infrajs/imager)
Необходимо для объединения нескольких расширений. Включает основные компоненты Infrajs.
Необходим для объединения нескольких расширений. Включает основные компоненты Infrajs.

- [infrajs/config](https://github.com/infrajs/config) - конфигурационные файлы .infra.json
- [infrajs/path](https://github.com/infrajs/path) - короткие адреса,
Expand All @@ -19,13 +18,13 @@ RewriteRule ^(.*)$ vendor/infrajs/router/index.php [L,QSA]


## Перенаправить запросы на index.php
С точки зрения роутера все запросы для которых не найдено файла являются 404 ошибкой. По этому нужно определить 404 страницу как php файл, на который и будут приходить все запросы.
Нужно создать файл .infra.json в корне проекта.
С точки зрения роутера все запросы, для которых не найдено файла являются 404 ошибкой. По этому нужно определить 404 страницу как php файл, на который и будут приходить все запросы.
Нужно создать файл **.infra.json** в корне проекта.

```json
{
"router":{
"404":"index.php"
}
}

```
```

0 comments on commit a599fd0

Please sign in to comment.