.htaccess - why isn't index.php working? -


i have single index.php page should link rest of websites.

<?php       if(!isset($_get['page']))$page = 'home.php';         else{             $page = $_get['page'] . ".php";         }      include("_includes/header.php");      include("_includes/navigation.php");      include("_pages/$page");      include("_includes/footer.php"); ?> 

this index.php looks like. it's supposed page click on (when clikc on navigation) , direct page header, navigation, , footer reused every page.

<div id="navi">     <ul>         <li><a href="home">home</a></li>         <li><a href="skills.php">skills</a></li>         <li><a href="_pages/my_projects.php">projects</a></li>         <li><a href="_pages/experience">experience</i></a></li>         <li><a href="_pages/personal">about</a></li>         <li><a href="_pages/contact">contact</a></li>     </ul> </div> 

according code "home" link should work says url not found because looking "home" in directory i'm in. in pages directory. "skills" same thing. ones work links projects through contact because specifying path. however, links work don't go through index page because header.php (which contains css), navigation.php, , footer.php not included here.

i did research , found had .htaccess file and/or mod_rewrite. can please me out. i've been looking 2-3weeks , nothing.

you should referencing index.php, not home..

<div id="navi">     <ul>         <li><a href="index.php?page=home">home</a></li>         <li><a href="skills.php">skills</a></li>         <li><a href="_pages/my_projects.php">projects</a></li>         <li><a href="_pages/experience">experience</i></a></li>         <li><a href="_pages/personal">about</a></li>         <li><a href="_pages/contact">contact</a></li>     </ul> </div> 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -