PHP Classes

Relink: Rewrite URLs based on mod_rewrite configuration

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   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
Description 

Author

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: 115511 in Austria Austria
Week rank: 273 Up1 in Austria Austria Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files (4)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,862
This week:0
All time:2,121
This week:673Up
 User Ratings  
 
 All time
Utility:70%StarStarStarStar
Consistency:65%StarStarStarStar
Documentation:60%StarStarStarStar
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:2152