Skip to content

Instantly share code, notes, and snippets.

@tieutantan
Created December 9, 2018 13:06
Show Gist options
  • Save tieutantan/3671e674a4d34e1d867bb57a47a9c42a to your computer and use it in GitHub Desktop.
Save tieutantan/3671e674a4d34e1d867bb57a47a9c42a to your computer and use it in GitHub Desktop.
PHP Function Base Template
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
<FilesMatch "stream\.php|README\.md|composer*">
Order allow,deny
Deny from all
</FilesMatch>
<?php
include 'vendor/autoload.php';
$query_string = trim($_SERVER['QUERY_STRING'], '/');
$query_array = explode('/', $query_string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment