problème réécriture d'url
salut, j'ai un soucis concernant l'url rewriting:
j'ai mon fichier.htaccess contenant ceci:
/**************************************************/
Code:
1 2 3 4
|
Options +FollowSymlinks
RewriteEngine on
RewriteRule testeur.html index.php?page=ta [L] |
/**************************************************/
mon fichier index.php:
/**************************************************/
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<?php
require('include.php');
$page=array("ta"=>"test1.php", "te"=>"test2.php", "ts"=>"test3.php", "tb"=>"test4.html");
if(isset($_GET['page']))
$p=$page[$_GET['page']];
else
$p="foster.php";
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test </title>
<link rel="stylesheet" href="style/style.css">
</head>
<body>
<div class="content">
<h2>Mon Site</h2>
<?php
if(isset($_SESSION['Tsers']))
{
include($p);
}else{
include('accueil.php');
}
?>
</div>
</body>
</html> |
/*******************************************************/
mon fichier test4.html contenant un formulaire
/******************************************************/
Code:
1 2 3 4 5 6
|
<form id="monform" method="post" action="index.php?page=ta">
<label for="numpol">NOM:</label><br/>
<input type="text" name="nomp" id="namep"/><br/>
<input type="submit" value="Rechercher" name="afficher"/>
</form> |
/****************************************************/
j'aimerai avoir dans l'url lors du clic sur mon fichier contenant mon formulaire testeur.html au lieu de index.php?page=ta