I have index.php file with:
<ul>
<li><a href="/">home</a></li>
<li><a href="index.php?id=1">Offer</a></li>
<li><a href="index.php?id=2">Contact</a></li>
</ul>
<?php
switch ($id) {
case '1':
include 'silnik/oferta.php';
break;
case '2':
include 'silnik/kontakt.php';
break;
default:
echo "<p>brak strony</p>";
break;
}
?>
And i want to change index.php?id=1 to /offer with .htaccess
I have in .htaccess
RewriteEngine On
RewriteRule ^([^/.]+)/?$ /index.php?id=$1
And this doesn't work. Pls help ;)