thecoofunka Posted May 23, 2010 Share Posted May 23, 2010 Dear all, I have encountered a problem in my index.php file. When visiting my website the pages opens with no problem but when I try to click on the sub-pages like HOME, ABOUT US, and CONTACT US. It gives me a server error. I have tried to point to the location of where these pages are located but still no results. I am not to familiar with PHP. What can I do to fix this issue and be able to view all pages. Below is the code I am having trouble with as far as I know. <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/" class="a11bold<?php if($_GET['page']=="") echo "sel";?>">HOME</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/about-us.php" class="a11bold<?php if($_GET['page']=="about-us") echo "sel";?>">ABOUT US</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/services.php" class="a11bold<?php if($_GET['page']=="services") echo "sel";?>">SERVICES</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/tools.php" class="a11bold<?php if($_GET['page']=="tools") echo "sel";?>">TOOLS</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/contact-us.php" class="a11bold<?php if($_GET['page']=="contact-us") echo "sel";?>">CONTACT US</td> -Alex Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/ Share on other sites More sharing options...
brem13 Posted May 23, 2010 Share Posted May 23, 2010 can you post the server error and more of the code if possible? Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062363 Share on other sites More sharing options...
-Karl- Posted May 23, 2010 Share Posted May 23, 2010 Post some more information in order for us to locate the issue. Also, use PHP tags. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062364 Share on other sites More sharing options...
thecoofunka Posted May 23, 2010 Author Share Posted May 23, 2010 Here is the requested information. This is the server error. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@website.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Here is more of the code. <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php require("include/main.inc.php"); ?> <head> <meta name="robots" content="noarchive"> <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.2)"> <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.2)"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>#HIDDEN#</title> <link href="sub-web/styles.css" rel="stylesheet" type="text/css"> </head> <body> <div align="center"> <table width="962px" cellpadding="0" cellspacing="0" style="background-color:#FFFFFF;"> <tr> <td width="6px" rowspan="6" style="background-image:url(sub-web/images/bg-tbl-left.png);background-repeat:repeat-y;"></td> <td width="950px" height="15px" style="background-image:url(sub-web/images/top-bar.png);background-repeat:repeat-x;"></td> <td width="6px" rowspan="6" style="background-image:url(sub-web/images/bg-tbl-right.png);background-repeat:repeat-y;"></td> </tr> <tr> <td height="140" valign="bottom" align="left" style="background-image:url(sub-web/images/top-gradient.png);background-repeat:repeat-x;"> <div align="left"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="27%" align="left"><img src="sub-web/images/logo.png" style="margin-left:20px;" border="0"></td> <td width="73%" align="right" valign="bottom"> <table border="0" cellspacing="1" cellpadding="0" style="margin-left:1px;margin-right:1px;"> <tr> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/" class="a11bold<?php if($_GET['page']=="") echo "sel";?>">HOME</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/about-us.php" class="a11bold<?php if($_GET['page']=="about-us") echo "sel";?>">ABOUT US</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/services.php" class="a11bold<?php if($_GET['page']=="services") echo "sel";?>">SERVICES</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/tools.php" class="a11bold<?php if($_GET['page']=="tools") echo "sel";?>">TOOLS</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/contact-us.php" class="a11bold<?php if($_GET['page']=="contact-us") echo "sel";?>">CONTACT US</td> </tr> </table> </td> </tr> </table> </div> </td> </tr> <tr> <td height="1" valign="top" style="background-color:#A6B8C3;"></td> </tr> <tr> <td valign="top"> <table border="0" cellpadding="1" cellspacing="0" width="100%"> <tr> <td width="660px" valign="top"> <div align="center" style="margin-top:2px"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td align="center"><img src="sub-web/images/top-banner.png" border="0"></td></tr> </table> </div> <div align="center" style="margin-top:3px; margin-left:1px;"> <?php if (file_exists("pages/".$_GET['page'].".php")) include("pages/".$_GET['page'].".php"); else include("pages/home.php"); ?> </div> </td> <td width="1px" height="800px" style="background-image:url(sub-web/images/separator-vert.png);background-repeat:repeat-y;"></td> <td width="280px" valign="top"> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="28px" width="4px" style="background-image:url(sub-web/images/title-left.png);"></td> <td height="28px" width="266px" style="background-image:url(sub-web/images/title-middle.png);background-repeat:repeat-x;" align="left"><font class="text11bold"> • LATEST COMPANY NEWS</font></td> <td height="28px" width="10px" style="background-image:url(sub-web/images/title-right.png);"></td> </tr> </table> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="500px"></td> </tr> </table> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="28px" width="4px" style="background-image:url(sub-web/images/title-left.png);"></td> <td height="28px" width="266px" style="background-image:url(sub-web/images/title-middle.png);background-repeat:repeat-x;" align="left"><font class="text11bold" align="left"> • CUSTOMER LOGIN</font></td> <td height="28px" width="10px" style="background-image:url(sub-web/images/title-right.png);"></td> </tr> </table> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="150px"></td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><img src="sub-web/images/advertise.png" border="0"></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td height="33px" align="center" style="background-image:url(sub-web/images/bottom-bar.png);background-repeat:repeat-x;"> <a href="sub-web/pages/" class="bottom-menu">HOME</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/about-us.php" class="bottom-menu">ABOUT US</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/services.php" class="bottom-menu">SERVICES</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/tools.php" class="bottom-menu">TOOLS</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/contact-us.php" class="bottom-menu">CONTACT US</a> </td> </tr> <tr> <td height="35px" align="center"><font class="text11normal">Copyright © <?=date('Y')?> <a href="http://www.xxxHIDEN.com/" class="a11normal">HIDDEN</a>. All Rights Reserved.</font></td> <div style="border:1px solid #ccc;padding:10px 0px 3px 0px;text-align:center;background-color:#FFFFFF;min-width:235px; margin: 5px 0 5px 0;"> <!--GOOGLE TRANSLATE MINI FLAGS--> <div align="center" style="width:auto;"> <!-- Add English to Russian BETA --> <a target="_blank" rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cru&hl=en&ie=UTF8'); return false;" title="Google-Translate-English to Russian BETA "><img border="0" style="cursor:pointer; cursor:hand;" width="24" alt="Google-Translate-English to Russian BETA " src="http://growpa.bay.livefilestore.com/y1phf9HxXBCzVD3KIGCm2oTlvoTGwR_rWkgTRQ0_w-Nw_Oi9OYdzIMfJjhl1kvbven1Fo61xxKLF_6KM7w_BlDhCg/_russian_s.png" height="24" title="Google-Translate-English to Russian BETA "/></a> <!-- END English to Russian BETA --> <!-- Add English to Spanish --> <a target="_blank" rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Ces&hl=en&ie=UTF8'); return false;" title="Google-Translate-English to Spanish "><img border="0" style="cursor:pointer; cursor:hand;" width="24" alt="Google-Translate-English to Spanish " src="http://growpa.bay.livefilestore.com/y1pS41oGyQtMRYc6yBTJoaovLHaCZOthp6qXfQxIau493uQ-BefJvBTkz5kliT5BfzKgxIZ8hYMuUXPjKEXio1Gow/_spanish_s.png" height="24" title="Google-Translate-English to Spanish "/></a> <!-- END English to Spanish --> </div> </div> </tr> </table> </div> </body> </html> -Alex Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062370 Share on other sites More sharing options...
-Karl- Posted May 23, 2010 Share Posted May 23, 2010 Not even going to help unless you put that code in to PHP tags. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062371 Share on other sites More sharing options...
thecoofunka Posted May 23, 2010 Author Share Posted May 23, 2010 Sorry. Do not want to be disobeying the rules. Where do you want me to put them? -Alex Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062373 Share on other sites More sharing options...
-Karl- Posted May 23, 2010 Share Posted May 23, 2010 Around your code. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062375 Share on other sites More sharing options...
thecoofunka Posted May 23, 2010 Author Share Posted May 23, 2010 Karl, But there is PHP tags around the codes that are using PHP. Some of the content is in HTML. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062377 Share on other sites More sharing options...
-Karl- Posted May 23, 2010 Share Posted May 23, 2010 I'm talking about PHP tags, which are a part of the BBcode on these forums. It's a form of syntax highlighting, which makes your code much easier to read. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062378 Share on other sites More sharing options...
thecoofunka Posted May 23, 2010 Author Share Posted May 23, 2010 Karl, Thank you. Below should be PHP tagged. Here is more of the code. <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php require("include/main.inc.php"); ?> <head> <meta name="robots" content="noarchive"> <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.2)"> <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.2)"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>#HIDDEN#</title> <link href="sub-web/styles.css" rel="stylesheet" type="text/css"> </head> <body> <div align="center"> <table width="962px" cellpadding="0" cellspacing="0" style="background-color:#FFFFFF;"> <tr> <td width="6px" rowspan="6" style="background-image:url(sub-web/images/bg-tbl-left.png);background-repeat:repeat-y;"></td> <td width="950px" height="15px" style="background-image:url(sub-web/images/top-bar.png);background-repeat:repeat-x;"></td> <td width="6px" rowspan="6" style="background-image:url(sub-web/images/bg-tbl-right.png);background-repeat:repeat-y;"></td> </tr> <tr> <td height="140" valign="bottom" align="left" style="background-image:url(sub-web/images/top-gradient.png);background-repeat:repeat-x;"> <div align="left"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="27%" align="left"><img src="sub-web/images/logo.png" style="margin-left:20px;" border="0"></td> <td width="73%" align="right" valign="bottom"> <table border="0" cellspacing="1" cellpadding="0" style="margin-left:1px;margin-right:1px;"> <tr> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/" class="a11bold<?php if($_GET['page']=="") echo "sel";?>">HOME</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/about-us.php" class="a11bold<?php if($_GET['page']=="about-us") echo "sel";?>">ABOUT US</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/services.php" class="a11bold<?php if($_GET['page']=="services") echo "sel";?>">SERVICES</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/tools.php" class="a11bold<?php if($_GET['page']=="tools") echo "sel";?>">TOOLS</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="sub-web/pages/contact-us.php" class="a11bold<?php if($_GET['page']=="contact-us") echo "sel";?>">CONTACT US</td> </tr> </table> </td> </tr> </table> </div> </td> </tr> <tr> <td height="1" valign="top" style="background-color:#A6B8C3;"></td> </tr> <tr> <td valign="top"> <table border="0" cellpadding="1" cellspacing="0" width="100%"> <tr> <td width="660px" valign="top"> <div align="center" style="margin-top:2px"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td align="center"><img src="sub-web/images/top-banner.png" border="0"></td></tr> </table> </div> <div align="center" style="margin-top:3px; margin-left:1px;"> <?php if (file_exists("pages/".$_GET['page'].".php")) include("pages/".$_GET['page'].".php"); else include("pages/home.php"); ?> </div> </td> <td width="1px" height="800px" style="background-image:url(sub-web/images/separator-vert.png);background-repeat:repeat-y;"></td> <td width="280px" valign="top"> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="28px" width="4px" style="background-image:url(sub-web/images/title-left.png);"></td> <td height="28px" width="266px" style="background-image:url(sub-web/images/title-middle.png);background-repeat:repeat-x;" align="left"><font class="text11bold"> • LATEST COMPANY NEWS</font></td> <td height="28px" width="10px" style="background-image:url(sub-web/images/title-right.png);"></td> </tr> </table> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="500px"></td> </tr> </table> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="28px" width="4px" style="background-image:url(sub-web/images/title-left.png);"></td> <td height="28px" width="266px" style="background-image:url(sub-web/images/title-middle.png);background-repeat:repeat-x;" align="left"><font class="text11bold" align="left"> • CUSTOMER LOGIN</font></td> <td height="28px" width="10px" style="background-image:url(sub-web/images/title-right.png);"></td> </tr> </table> <table width="280px" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="150px"></td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><img src="sub-web/images/advertise.png" border="0"></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td height="33px" align="center" style="background-image:url(sub-web/images/bottom-bar.png);background-repeat:repeat-x;"> <a href="sub-web/pages/" class="bottom-menu">HOME</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/about-us.php" class="bottom-menu">ABOUT US</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/services.php" class="bottom-menu">SERVICES</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/tools.php" class="bottom-menu">TOOLS</a> <font class="bottom-menu-text">::</font> <a href="sub-web/pages/contact-us.php" class="bottom-menu">CONTACT US</a> </td> </tr> <tr> <td height="35px" align="center"><font class="text11normal">Copyright © <?=date('Y')?> <a href="http://www.xxxHIDEN.com/" class="a11normal">HIDDEN</a>. All Rights Reserved.</font></td> <div style="border:1px solid #ccc;padding:10px 0px 3px 0px;text-align:center;background-color:#FFFFFF;min-width:235px; margin: 5px 0 5px 0;"> <!--GOOGLE TRANSLATE MINI FLAGS--> <div align="center" style="width:auto;"> <!-- Add English to Russian BETA --> <a target="_blank" rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cru&hl=en&ie=UTF8'); return false;" title="Google-Translate-English to Russian BETA "><img border="0" style="cursor:pointer; cursor:hand;" width="24" alt="Google-Translate-English to Russian BETA " src="http://growpa.bay.livefilestore.com/y1phf9HxXBCzVD3KIGCm2oTlvoTGwR_rWkgTRQ0_w-Nw_Oi9OYdzIMfJjhl1kvbven1Fo61xxKLF_6KM7w_BlDhCg/_russian_s.png" height="24" title="Google-Translate-English to Russian BETA "/></a> <!-- END English to Russian BETA --> <!-- Add English to Spanish --> <a target="_blank" rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Ces&hl=en&ie=UTF8'); return false;" title="Google-Translate-English to Spanish "><img border="0" style="cursor:pointer; cursor:hand;" width="24" alt="Google-Translate-English to Spanish " src="http://growpa.bay.livefilestore.com/y1pS41oGyQtMRYc6yBTJoaovLHaCZOthp6qXfQxIau493uQ-BefJvBTkz5kliT5BfzKgxIZ8hYMuUXPjKEXio1Gow/_spanish_s.png" height="24" title="Google-Translate-English to Spanish "/></a> <!-- END English to Spanish --> </div> </div> </tr> </table> </div> </body> </html> -Alex Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062381 Share on other sites More sharing options...
-Karl- Posted May 24, 2010 Share Posted May 24, 2010 if (file_exists("pages/".$_GET['page'].".php")) include("pages/".$_GET['page'].".php"); Simply won't work in your case, as it expects to see, home.php?page= page= will determine which file it should include (if it exists). At the moment you're coding will never work as $_GET['page'] will never exist. Unless you did: <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="home.php" class="a11bold<?php if($_GET['page']=="") echo "sel";?>">HOME</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="home.php?page=about-us" class="a11bold<?php if($_GET['page']=="about-us") echo "sel";?>">ABOUT US</a></td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="home.php?page=services" class="a11bold<?php if($_GET['page']=="services") echo "sel";?>">SERVICES</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="home.php?page=tools" class="a11bold<?php if($_GET['page']=="tools") echo "sel";?>">TOOLS</td> <td width="99px" height="36px" style="background-image:url(sub-web/images/tab-button.png);" align="center"><a href="home.php?page=contact-us" class="a11bold<?php if($_GET['page']=="contact-us") echo "sel";?>">CONTACT US</td> That probably won't work, but it gives you the rough idea. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062384 Share on other sites More sharing options...
thecoofunka Posted May 24, 2010 Author Share Posted May 24, 2010 Karl, But I still do not understand why they will not show if these pages like ABOUT US do exist in my public_html/sub-web/pages folder. How can I correct the code since these files do exist. -Alex Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062394 Share on other sites More sharing options...
-Karl- Posted May 24, 2010 Share Posted May 24, 2010 It won't work because of how the GET method works. if (file_exists("pages/".$_GET['page'].".php")) include("pages/".$_GET['page'].".php"); That $_GET['page'] is returning nothing, ever. That's why it shows the home.php. The GET looks for what page, equals. So, home.php?page=about-us In that example, page equals about.us. Therefore include("pages/".$_GET['page'].".php");, would be the equivalent of include("pages/about-us.php"); But with the way your links are set out, there is no GET method being defined, so it will always be null. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062396 Share on other sites More sharing options...
marcus Posted May 24, 2010 Share Posted May 24, 2010 That server error isn't caused by your script. It's Apache, maybe the permissions on your file aren't correct? CHMOD them to 755. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062411 Share on other sites More sharing options...
-Karl- Posted May 24, 2010 Share Posted May 24, 2010 That server error isn't caused by your script. It's Apache, maybe the permissions on your file aren't correct? CHMOD them to 755. It could be the permissions, however, a 500 error is given if there isn't another suitable error to be displayed. So it could in fact, be his script. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062414 Share on other sites More sharing options...
marcus Posted May 24, 2010 Share Posted May 24, 2010 500 Internal Error refers to the clients access to the requested URL. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062415 Share on other sites More sharing options...
thecoofunka Posted May 24, 2010 Author Share Posted May 24, 2010 Well. I have tried to change all permissions and still no result so I think it's the error in my code. Karl, so get method will not work. How do I go about fixing this problem? As I know it has worked before until I have moved and changed some files. Someone else was taking care of the site until I took over. How do I get it to work properly? My index.php is located in public_html/sub-web/index.php all my other pages like ABOUT US is located in public_html/sub-web/pages/ -Alex Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062450 Share on other sites More sharing options...
-Karl- Posted May 24, 2010 Share Posted May 24, 2010 Well, I'm not sure how you had it before the changes. Could have been a .htaccess file. Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062454 Share on other sites More sharing options...
thecoofunka Posted May 24, 2010 Author Share Posted May 24, 2010 Karl, Yes. I played with the htaccess file because I could not make a second project on the same public_html folder and it would always point to my main site whatever I typed. So there would be no solutions for this? Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062636 Share on other sites More sharing options...
thecoofunka Posted May 25, 2010 Author Share Posted May 25, 2010 What else can I do to make the pages that I already have in public_html/sub-web/pages show on my main index.php Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1062842 Share on other sites More sharing options...
thecoofunka Posted May 25, 2010 Author Share Posted May 25, 2010 No solution for my problem? Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1063274 Share on other sites More sharing options...
jcbones Posted May 25, 2010 Share Posted May 25, 2010 -Karl- is right 100%. If you don't want your links to look like "home.php?page=about-us". Then you have 2 options. Rebuild your pages, or make a .htaccess file, and use mod-rewrite. .htaccess RewriteEngine on RewriteRule ^sub-web/pages/(.*).php$ sub-web/index.php?page=$1 Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1063304 Share on other sites More sharing options...
-Karl- Posted May 25, 2010 Share Posted May 25, 2010 jcbones is correct. That's the only alternative. I would have replied sooner, but I got called in to work on my day off Quote Link to comment https://forums.phpfreaks.com/topic/202684-navigating-to-pages/#findComment-1063305 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.