PHP Classes

Relink: Rewrite URLs based on mod_rewrite configuration

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 54%Total: 1,862 All time: 2,121 This week: 673Up
Version License PHP version Categories
relink 0.1GNU General Publi...3HTTP, Configuration


This class can be used to rewrite link URLs according to mod_rewrite configuration directives.

It reads an Apache configuration file to find mod_rewrite configuration directives within delimited file sections.

The class can take URLs of relative links and rewrite them based on the mod_rewrite rules found in the Apache configuration file.

Innovation Award
PHP Programming Innovation award nominee
September 2008
Number 6

Prize: One book of choice by O'Reilly
mod_rewrite is an Apache server module that converts the URLs used to access to a site to URLs of a different format using regular expressions.

mod_rewrite is often used to make a site use friendly URLs for pages that are easier to read by the users.

However, if you have a regular URL and need to go back the friendly URL, usually the site code must know the URL rewriting rules.

This class provides a different solution that allows a site to automatically determine the URLs of a page before being rewritten. It reads Apache configuration files and reverts the mod_rewrite rules applied to a site relative URL.

Manuel Lemos
Picture of Benjamin Falk
Name: Benjamin Falk <contact>
Classes: 3 packages by
Country: Austria Austria
Age: 34
All time rank: 115411 in Austria Austria
Week rank: 195 Up1 in Austria Austria Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Accessible without login Plain text file class.relink.php Class Contains the class itself
Accessible without login Plain text file DOC Doc. A short documentation
Accessible without login Plain text file example.php Example An example script, using the class
Accessible without login Plain text file htaccess-example Example An example htaccess

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,121
This week:673Up
 User Ratings  
 All time