# Set the default handler.
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
# Usually RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
RewriteRule ^post/([^/.]+)/?$ index.php?id=index&post=$1 [L]
RewriteRule ^tag/([^/.]+)/?$ index.php?id=index&tag=$1 [L]
RewriteRule ^page/([^/.]+)/?$ index.php?id=index&page=$1 [L]
RewriteRule ^archive/([^/.]+)/?$ index.php?id=index&archive=$1 [L]
RewriteRule ^category/([^/.]+)/?$ index.php?id=index&category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>
ok Panowie udało mi się naskrobać coś takiego i fajnie działa:
<?php
$www="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if ($www == 'http://strona.idl.pl/' || $www == 'http://www.strona.idl.pl/' || $www == 'strona.idl.pl/' || $www == 'www.strona.idl.pl/') :
?>
tresc do pokazania tylko na stronie glownej
<?php endif; ?>
Jednak chciałbym dodać do tego raunek else (jeżeli jestem obecnie na podstronie to pojawia sie inny box.
<?php
$www="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if ($www == 'http://strona.idl.pl/' || $www == 'http://www.strona.idl.pl/' || $www == 'strona.idl.pl/' || $www == 'www.strona.idl.pl/') :
?>
tresc do pokazania tylko na stronie glownej
<?php
else {
echo 'tresc na podstronach'; } ?>
Ale coś nie bardzo funkcjonuje... można to zrobić ten sposób co pokazałem czy trzeba wszystko wziąść w kod php i "tresc do pokazania tylko na stronie glownej" dać w echo?