mpempas Posted January 6, 2010 Share Posted January 6, 2010 Ive looked around but with no luck at all, i have a peace of code and when im visiting my site with www.mysite.com/?action=something everything is gread, but when im trying to load the content from www.mysite.com/something/ it goes to the default content becuse it cant find the file??!!? Here is the code hoping someone can help me out with this. <?php if(file_exists($rootpath.$new_site.'.php')) { require_once($rootpath.$new_site.'.php'); } else { // echo('file not found /'.$new_site); $_SESSION['default_cat'] = 1; require_once($rootpath.$con_folder1.'/intro.php'); } ?> Hope anyone can give me solution Thank you Quote Link to comment https://forums.phpfreaks.com/topic/187488-problem-loading-content-from-diferent-dir-than-the-root-folder/ Share on other sites More sharing options...
ignace Posted January 6, 2010 Share Posted January 6, 2010 You need .htaccess to translate /something/ to ?action=something unless you write /index.php/something Quote Link to comment https://forums.phpfreaks.com/topic/187488-problem-loading-content-from-diferent-dir-than-the-root-folder/#findComment-989968 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.