Answer the question
In order to leave comments, you need to log in
How to set up a transition between pages?
Good afternoon. I wrote such a simple transition between pages, but I ran into one problem. All the page names for me will be get requests, this means that the question mark after the page name or the ID number will be ignored. I can’t figure out how to fix this, if someone not hard to tell.
$id = "main";
if (isset($_GET["id"])){
$id = $_GET["id"];
}
if ($id == "") {
$id = "main";
}
include ("pages/$id.php");
include ("pages/base.php");
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?id=$1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question