RewriteRule w .htaccess
: czw gru 16, 2004 2:38 am
czytalem art. na webinside.pl o ładnych url-ach i pare innych w sieci ale zadne konkretnie nie tlumaczy a co najwazniejsze nie podaje gotowego przykladu, wszystko to sa ogólne powiedzonka co jak można by zrobić a mi to nie wychodzi, czy może ktoś konkretnie wie jaki RewriteRule w .htaccess zrobić gdy w kodzie mam cos takiego:
[php]<?php
<?
if ( !isset ( $x ) ) {
include( "inc/index.php" );}
else if($x==21)
{ include( "inc/x/web/" . "21" . ".inc"); }
else if($x==22)
{ include( "inc/x/web/" . "22" . ".inc"); }
else if($x==23)
{ include( "inc/x/web/" . "artykuly" . ".inc"); }
else if($x==51)
{ include( "inc/x/stopka/" . "polityka" . ".inc"); }
else if($x==52)
{ include( "inc/x/stopka/" . "strona" . ".inc"); }
else
echo '<meta http-equiv="refresh" content="0; url=index.php" />';
?>
?>[/php]
jak zapisac adres i co wstawic do .htaccess? zeby powyzszy kod byl obslugiwany, a serwer bez problemu parsował brzydki url na ładny Smile
[php]<?php
<?
if ( !isset ( $x ) ) {
include( "inc/index.php" );}
else if($x==21)
{ include( "inc/x/web/" . "21" . ".inc"); }
else if($x==22)
{ include( "inc/x/web/" . "22" . ".inc"); }
else if($x==23)
{ include( "inc/x/web/" . "artykuly" . ".inc"); }
else if($x==51)
{ include( "inc/x/stopka/" . "polityka" . ".inc"); }
else if($x==52)
{ include( "inc/x/stopka/" . "strona" . ".inc"); }
else
echo '<meta http-equiv="refresh" content="0; url=index.php" />';
?>
?>[/php]
jak zapisac adres i co wstawic do .htaccess? zeby powyzszy kod byl obslugiwany, a serwer bez problemu parsował brzydki url na ładny Smile