PHP Mod_rewrite
Napsal: 02 úno 2013 19:45
Takto mam upraveny .htaccess aby mi překladal adresy typu www.blabla.cz/?action=start na www.blabla.cz/start/
Potřebuju abych mohl použit i adresu www.blabla.cz/kontakt/thanks/ a v realu by to otevřelo www.blabla.cz/?action=kontakt/thanks boužel když to mam takhle zapsane nefunguje to...
Potřebuju abych mohl použit i adresu www.blabla.cz/kontakt/thanks/ a v realu by to otevřelo www.blabla.cz/?action=kontakt/thanks boužel když to mam takhle zapsane nefunguje to...
Kód: Vybrat vše
RewriteEngine On
RewriteRule ^([^/]*)/$ /?action=$1 [L]
Kód: Vybrat vše
<?php
if (isset($HTTP_GET_VARS['action']))
{
$action = $HTTP_GET_VARS['action'];
if ($action=="start") include('start.php');
if ($action=="kontakt") include('kontakt/kontakt.php');
if ($action=='kontakt/thanks') include('kontakt/thanks/thanks.php');
} else include "start.php";
?>