Hi, I'm using a script that is based on a single paged template file. I am trying to get different content to be displayed on the index page, currently putting it into the template currently is making it display on everypage instead of just the index page. Was wondering in php if it was possible to make a condition based on the url (and then i could use a SSI), such as: if url = mysite.com/index.php then inlcude-onlydisplayonindex.php else .. .. Could anyone help out or point me in the right direction. Cheers.
yes you can : <? $currentFile = $_SERVER["PHP_SELF"]; echo $currentFile; //testing purposes you can remove that later if ($currentFile == 'your target url') { include 'somefile.php'; } ?> Code (markup):