2017 © Pedro PelĂĄez
 

library router

image

cmoclyn/router

  • Friday, January 19, 2018
  • by cmoclyn
  • Repository
  • 0 Watchers
  • 0 Stars
  • 8 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Router for PHP

## Documentation

There is 2 versions of this Router, one for PHP 7 (branch master-7) and one for PHP 5.6 (branch master-5.6), (*1)

.htaccess example

RewriteEngine On

RewriteCond %{REQUEST_URI} "^.*\.css" # If CSS
RewriteRule "^(.*)$" "web/css/$1" [END] # CSS folder

RewriteCond %{HTTP_HOST} "^localhost" # If localhost
RewriteRule "^(.*)$" "web/web_dev.php" [END] # Dev

RewriteRule "^(.*)$" "web/web.php" [END] # Prod

Use the router

To use the router, you just have to create a .htaccess like the above's one, at the root project, and create a web folder in which you will put web.php, web_dev.php and all the resources you need., (*2)

The Versions

19/01 2018

dev-master-7

dev-master-7

  Sources   Download

Apache-2.0

The Requires

 

by Cédric Moclyn

17/01 2018

dev-master

9999999-dev

  Sources   Download

Apache-2.0

The Requires

 

by Cédric Moclyn