Vivid Lust Posted October 28, 2009 Share Posted October 28, 2009 I'm using the following code, but it isnt working - it doesnt echo "homepage" when it is on the root page, e.g : www.mysite.com/ :'( <?php $addressFull = $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; if( $addressFull == $_SERVER["SERVER_NAME"] ){ echo 'homepage'; }?> Help anyone? Thanks Quote Link to comment Share on other sites More sharing options...
seanlim Posted October 28, 2009 Share Posted October 28, 2009 try changing your conditional to: if( $_SERVER['REQUEST_URI']=="/"){ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.