Login   Register  
PHP Classes
elePHPant
Icontem

File: .htaccess

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kristo Vaher  >  Wave Framework  >  .htaccess  >  Download  
File: .htaccess
Role: Auxiliary data
Content type: text/plain
Description: Apache directives
Class: Wave Framework
MVC framework for building Web sites and APIs
Author: By
Last change: Removed author information from project-specific files, updated other documentation inconsistencies.
Date: 1 year ago
Size: 1,445 bytes
 

Contents

Class file image Download
# Wave Framework <http://www.waveframework.com>
# Apache Configuration
# 
# Apache commands are stored in this file. This file loads the RewriteEngine, which is used 
# redirect all HTTP requests, except those to /static/ folders and those that are PHP files 
# itself, to Index Gateway stored in /index.php. These commands and Wave Framework itself 
# only work when RewriteEngine is supported on the web server.
# 
# @package    Index Gateway
# @author     Kristo Vaher <kristo@waher.net>
# @copyright  Copyright (c) 2012, Kristo Vaher
# @license    GNU Lesser General Public License Version 3
# @tutorial   /doc/pages/rewrites.htm
# @since      1.0.0
# @version    3.1.4

# This is required on some server setups for RewriteEngine to work properly
# But this can also throw 500 errors on some hosting environments, if it does then remove it
Options +FollowSymLinks 

# RewriteEngine is required to make Index gateway work correctly
RewriteEngine on

# Files from static folder are served directly
RewriteRule ^resources/static/ - [L]
RewriteRule ^filesystem/static/ - [L]

# Everything that is not a PHP file is redirected to index.php
# If you do not wish to redirect all to index.php, then write different RewriteRules for this reason
# Everything redirected through Index gateway will make a small hit on performance, but offer better handling and control in PHP
RewriteRule !^(.*)\.php$ ./index.php [QSA,L]