gary00ie Posted June 16, 2011 Share Posted June 16, 2011 Hi, This may seem like a dumb question, but, I'm developing a site, I have all my pages almost finished, however, I have a problem that is so simple that I think I just need a fresh point of iew on it! I have a site :www.fobar.com/test/index.php - I have a sidebar menu with links i.e. <a href = page1.php>Page1</a> <a href = page2.php>Page2</a> etc. Whenever I go from page1 to page2, the page isn't found because the url is showing up as: www.fobar.com/page1.php/page2.php rather than: www.fobar.com/page2.php Am I doing something incredibly stupid? I never came across this before that I can remember. Any idea's would be much appreciated. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/ Share on other sites More sharing options...
kenrbnsn Posted June 16, 2011 Share Posted June 16, 2011 Please post your code between tags. This sample code works for me: <?php for ($i=0;$i<10;++$i) { echo "<a href='page{$i}.php'>Page $i</a><br>\n"; } ?> Ken Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/#findComment-1230342 Share on other sites More sharing options...
gary00ie Posted June 16, 2011 Author Share Posted June 16, 2011 Thanks for the reply Ken. Maybe I didn't explain my situation correctly. I don't see how that can help me in this particular situation. I have a url: www.mysite.com I am testing a new site in a directory as follows: www.mysite.com/test/ This test directory holds a new site which has links to eachpage within that test site, i.e. www.mysite.com/test/index.php But when I click on link1.php on the test site, I get: www.mysite.com/test/index.php/link1.php Do you have any ideas what's going on? Sometimes it works fine and goes to the correct link buut not for the most part. Any help / ideas would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/#findComment-1230345 Share on other sites More sharing options...
TheSky Posted June 16, 2011 Share Posted June 16, 2011 maybe it helps if you write full url ? Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/#findComment-1230353 Share on other sites More sharing options...
gary00ie Posted June 16, 2011 Author Share Posted June 16, 2011 maybe it helps if you write full url ? Thanks for that. That was my initial thought but I'd prefer not to but seen as it's just one include file it might be the easiest solution. Although, in saying that, I just noticed that some of the included CSS includes are not showing up either on occasion. I have a feeling something else is going on here. Thanks again for all the replies and suggestions. Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/#findComment-1230355 Share on other sites More sharing options...
kenrbnsn Posted June 16, 2011 Share Posted June 16, 2011 Does this have anything to do with PHP? Without seeing your code, it's pretty hard to tell you what's going wrong. Ken Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/#findComment-1230479 Share on other sites More sharing options...
seany123 Posted June 16, 2011 Share Posted June 16, 2011 try this.... <a href = "./page1.php">Page1</a> Quote Link to comment https://forums.phpfreaks.com/topic/239507-urls/#findComment-1230530 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.