RewriteEngine On
RewriteRule ^[a-z]/* index.php
The process the script in the file of index.php
<?php
// you can process the url use this one
$q = $_SERVER['REQUEST_URI'];
$queries = explode('/',$q);
$page = $queries[1];
if($page == 'css'){
include "css/index.php";
}else if($page == 'js'){
include "js/index.php";
}else if($page == 'hello'){
include ("hello.php");
}else{
include "404.php";
}
?>
No comments:
Post a Comment