Login   Register  
PHP Classes
elePHPant
Icontem

File: htaccess-example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Benjamin Falk  >  Relink  >  htaccess-example  
File: htaccess-example
Role: Example script
Content type: text/plain
Description: An example htaccess
Class: Relink
Rewrite URLs based on mod_rewrite configuration
 

Contents

Class file image Download
## This is an example .htaccess-file
## To get everything automatically parsed, the following line is needed
#set link auto on

##From now on, every RewriteRule gets recognised.
RewriteEngine on
RewriteRule (.+?)\.html                    ?page=$1
RewriteRule (.+?)\.html/([\w]+)            ?page=$1&mode=$2
RewriteRule ^special\:(.+?)\.html/value\:(.+?)$    ?$1&value=$2

##You can also change the text before the real link by the following line
#set link start http://example.org