I have this tag in the index
<a href="projeto">Projeto</a>
What sends me to this page
localhost / project.php
What I'm leaving like this
localhost / project
With
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
DirectoryIndex home.php home.html index.php index.html
But now I need to pass two variables through the url, it would look like this
<a href="projeto?id=25&nome=aqui_vai_o_nome">Projeto</a>
But I need the URL to be this way
localhost / project / 25 / aqui_vai_o_nome
Remembering that I need to get these two data inside the PROJECT page
This is the project code.php
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Document</title>
<?php include('include/baseHead-2.php'); ?>
<!-- Bootstrap CSS -->
<?php include('include/fonts.php'); ?>
<?php include('include/css-2.php'); ?>
</head>
<body>
<?php include('include/topbar-2.php'); ?>
<div class="container-flex m-primary container-title-page">
<div class="container py-80">
<div><h1 class="ff-os">Titulo da pagina</h1></div>
<div><h2 class="ff-os"><a href="../../home" class="ff-os">Home</a> / Pagina atual</h2></div>
</div>
</div>
<div class="container py-100 container-*">
<div class="row h-200px">
<?php
echo $_GET['id'];
?>
</div>
</div>
<?php include('include/footer-2.php'); ?>
</body>
<?php include('include/js-2.php'); ?>
</html>
This is my .htaccess and the new project.php where you are not getting $ _GET
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([0-9A-z_-]+)$ $1.php
RewriteRule ^projeto\/([0-9A-z_-]+)\/([0-9A-z_-]+)$ projeto.php?id=$1&nome=$2
DirectoryIndex home.php home.html index.php index.html
project.php - "project / 15 / name"
<?php
echo $_GET['id']."</br>";
echo $_GET['nome'];
?>