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 2y 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 4w 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 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

1857d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/01728478f51ea71d229310e23f073a9ed4390b81be09744fbab1cce7feced504?d=identicon)[RemySd](/maintainers/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

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M317](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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