Answer the question
In order to leave comments, you need to log in
How to fix problem with php scripts (working with .htaccess)?
.htaccess (this is just part of it): RewriteRule ^(.*)$ /index.php?key=$1 [L]
index.php:
<?php
$key = $_GET['key'];
switch ($key) {
case 'main':
require_once './main.php';
break;
// ...
default:
require_once './error404.php';
}
?>
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question