PHPackages                             remysd/simple-router - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. remysd/simple-router

ActiveLibrary[HTTP &amp; Networking](/categories/http)

remysd/simple-router
====================

A simple router to match with your url's

1.3.0(5y ago)06MITPHP

Since Apr 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/RemySd/simple-router)[ Packagist](https://packagist.org/packages/remysd/simple-router)[ RSS](/packages/remysd-simple-router/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (0)

A simple php router to match with your url's
============================================

[](#a-simple-php-router-to-match-with-your-urls)

[![Packagist Version](https://camo.githubusercontent.com/de26a0f022e568d86e9d8c120222a4b5182b5391d7fd7bc310ab09a72a53acdb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72656d7973642f73696d706c652d726f75746572)](https://camo.githubusercontent.com/de26a0f022e568d86e9d8c120222a4b5182b5391d7fd7bc310ab09a72a53acdb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72656d7973642f73696d706c652d726f75746572)[![PHP from Packagist](https://camo.githubusercontent.com/24b3d8926270548d8b6b132d80401077043fbff08c9609fd53ca16956bd73a79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72656d7973642f73696d706c652d726f75746572)](https://camo.githubusercontent.com/24b3d8926270548d8b6b132d80401077043fbff08c9609fd53ca16956bd73a79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72656d7973642f73696d706c652d726f75746572)

Installation
------------

[](#installation)

```
composer require remysd/simple-router
```

Example
-------

[](#example)

```
require './vendor/autoload.php';

use RemySd\SimpleRouter\Router;

$router = new Router();

$router->setBasePath('/simple-router');

$router->addRoute('/articles', 'article', 'all', 'article_all');
$router->addRoute('/articles/{id}', 'article', 'show', 'article_single');

$properties = $router->match($_SERVER['REQUEST_URI']);

$url = $router->generate('single_article', ['id' => 3]);
```

Requirements
------------

[](#requirements)

Minimun configuration required in `.htaccess`

```
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

1913d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47244355?v=4)[Remy Sainsard](/maintainers/RemySd)[@RemySd](https://github.com/RemySd)

---

Top Contributors

[![RemySd](https://avatars.githubusercontent.com/u/47244355?v=4)](https://github.com/RemySd "RemySd (10 commits)")

---

Tags

php-libraryphp-router

### Embed Badge

![Health badge](/badges/remysd-simple-router/health.svg)

```
[![Health](https://phpackages.com/badges/remysd-simple-router/health.svg)](https://phpackages.com/packages/remysd-simple-router)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M91](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
