Czy można napisać jakiś kontroler który by w pliku .htaccess dodawał automatycznie reguły dla nowych podstron, a nie trzeba by było ręcznie każdej nowej strony osobno dodawać?
Pozdrawiam
<?php public function select_page_nag($page) { switch($page) { case '': $this->glowna_txt(); break; case 'oferta': $this->glowna_txt(); break; case 'kontakt': $this->glowna_txt(); break; case 'wiadomosci': include("news.php"); break; case 'mail': include_once("mail.php"); break; case 'mail_send'; include("mail.php"); break; case 'galeria'; include("galeria.php"); break; case (int) include("galeria.php"); break; } return $page; } ?>
<?php if($page == '') { $result = $this->set_query('SELECT naglowek from pages where id_strony = 0'); } elseif($page == 'oferta') { $result = $this->set_query('SELECT naglowek from pages where id_strony = 2'); } elseif($page == 'kontakt') { $result = $this->set_query('SELECT naglowek from pages where id_strony = 3'); } ..//[..].. ?>
<?php ?>