PHPackages                             giftcards/mod-rewrite-bundle - 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. [Framework](/categories/framework)
4. /
5. giftcards/mod-rewrite-bundle

ActiveLibrary[Framework](/categories/framework)

giftcards/mod-rewrite-bundle
============================

Bundle that integrates the mod rewrite library into Symfony

1.1.0(9y ago)23.6k1PHPCI failing

Since Feb 26Pushed 9y ago7 watchersCompare

[ Source](https://github.com/giftcards/GiftcardsModRewriteBundle)[ Packagist](https://packagist.org/packages/giftcards/mod-rewrite-bundle)[ RSS](/packages/giftcards-mod-rewrite-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

GiftcardsModRewriteBundle [![Build Status](https://camo.githubusercontent.com/567c33554fb756ba1992e4fb350a7897e23eb83e37d6cd76d2921c1d50f21218/68747470733a2f2f7472617669732d63692e6f72672f6769667463617264732f4769667463617264734d6f645265777269746542756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/giftcards/GiftcardsModRewriteBundle)
==================================================================================================================================================================================================================================================================================================================================================================

[](#giftcardsmodrewritebundle-)

Bundle that integrates the [mod rewrite library](https://github.com/giftcards/ModRewrite) into symfony

Config
------

[](#config)

### Default config

[](#default-config)

```
# Default configuration for extension with alias: "giftcards_mod_rewrite"
giftcards_mod_rewrite:
    files:                []
    rewrite_listener:
        enabled:              true
        handle_redirects:     true
        files:                []
    router:
        enabled:              false
        priority:             0
        controller:           'GiftcardsModRewriteBundle:Rewrite:rewrite'
```

New in version 1.1.0
--------------------

[](#new-in-version-110)

You can configure the files to read in the `files` key at the root of the config instead of under rewrite\_listener key and it will be used for both the rewrite listener as well as the router. The `rewrite_listener.files` key has been deprecated.

The Rewrite Listener
--------------------

[](#the-rewrite-listener)

the rewrite listener will take requests and set the result of the rewriter to the request attribute `mod_rewrite_result` if there is a match. to retrieve it call `$request->atributes->get('mod_rewrite_result')`.

the files config is a list fo files to load mod rewrite directives from. handle\_redirects tells the listener if it hsould just set a redirect directly on the `GetResponseEvent` and cause a redirect immediately if the result says to redirect. if you dont want the listener then set enabled to false.

The Router
----------

[](#the-router)

Now you can also enable the mod rewrite router. This is really only useful generally in addition to other routers but you can use it however you want like any symfony router after its enabled. By default its been setup to be easily integrated with the [CMF Routing Bundle](https://github.com/symfony-cmf/routing-bundle)'s chain routing. You can configure its priority right in the config. When it is enabled it will route mod rewrite matches to the `GiftcardsModRewriteBundle:Rewrite:rewrite` controller action. This action will return responses immediately for matches that are configured to do so (ex. R, G, F flags). For others that in apache would trigger an internal redirect in apache a sub request is generated and sent back through the request system. This should be a pretty good mirror of what would happen in an apache setup.

You can enable the router using the `router.enabled` key, configure what controller action is gets routed to using the `router.controller` key and configure the routers prirority in the chain router using the `router.priority` key.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

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 ~374 days

Total

3

Last Release

3350d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9aab16f03ae39f3bbf4472b979c610ed91b109dde5f964f02d679734e557b1d?d=identicon)[Alex-BHN](/maintainers/Alex-BHN)

![](https://www.gravatar.com/avatar/56f9d1be2ddc47f4f2c891cac47d6ea575757dfb31b2b20056a7333390deae02?d=identicon)[yjv](/maintainers/yjv)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/giftcards-mod-rewrite-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/giftcards-mod-rewrite-bundle/health.svg)](https://phpackages.com/packages/giftcards-mod-rewrite-bundle)
```

###  Alternatives

[ezsystems/ezpublish-kernel

Kernel used by ezsystems/ezplatform and derivatives. Provides the Content Repository, its APIs, and the application's Symfony framework integration.

163579.5k141](/packages/ezsystems-ezpublish-kernel)[imag/ldap-bundle

LDAP Bundle for Symfony 2

108191.0k1](/packages/imag-ldap-bundle)[ed/blog-bundle

Symfony EDBlogBundle

348.4k](/packages/ed-blog-bundle)[jogaram/react-bundle

ReactPHP Bundle for Symfony2

235.7k](/packages/jogaram-react-bundle)

PHPackages © 2026

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