It's possible via .htaccess send query to another file? A bit explaining:
index.php handle all pages like this:
switch($page) {
case 'index':
require_once START . '/includes/pages/index.php';
break;
case 'another':
require_once START . '/includes/pages/another.php';
break;
and so on...
In .htaccess:
RewriteRule ^index$ index.php?page=index [L]
RewriteRule ^another$ index.php?page=another [L]
Links(eg. localhost/84ss7d41):
RewriteRule ^(.*)$ index.php?QUERY_STRING=$1 [L]
So in /includes/pages/index.php:
if ($_GET['QUERY_STRING']) {
$_SERVER['QUERY_STRING'] = $_GET['QUERY_STRING'];
$query_string = check_input($_SERVER['QUERY_STRING']);
//checking/validating processing further...
How to make links like this one localhost/84ss7d41 work in same way as now, but without index.php ? I'm trying to seperate my "project" if something would happen (files accidentally deleted) checking/validating data would work same, without main script, it's like:
if (main project file index.php/ || /includes/pages/index.php doesn't exist) {
check/validate data with reserve.php
}