9999 Posted February 14, 2008 Share Posted February 14, 2008 How do you name your pages like this?: www.mysite.com/?pageid=1 www.mysite.com/?pageid=2 Instead of the normal way: www.mysite.com/page1.php www.mysite.com/page2.php Also, what are the advantages/disasdvantages of this and how does this effect the way search engines view the page? Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/ Share on other sites More sharing options...
Northern Flame Posted February 14, 2008 Share Posted February 14, 2008 just make the index.php get the $_GET variables example: index.php <?php echo $_GET['page']; ?> then go to http://www.yourwebsite.com/?page=home i dont know how it affects the search engines, but i've heard that some search engines do not index pages with variables in the URL. Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466517 Share on other sites More sharing options...
mem0ri Posted February 14, 2008 Share Posted February 14, 2008 The page naming is actually: http://www.mysite.com/index.php?page=2 It's called "dynamic" paging...and basically you're just sending at $_GET variable to the index page over and over again to tell it which .php (or .html or other) file to load for content. Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466518 Share on other sites More sharing options...
9999 Posted February 14, 2008 Author Share Posted February 14, 2008 Thanks. So, when I upload a page to be displayed as http://www.mysite.com/index.php?page=2 do I upload it as "2.php" Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466520 Share on other sites More sharing options...
Northern Flame Posted February 14, 2008 Share Posted February 14, 2008 its up to you. you can do something like this: <?php switch($_GET['page']){ case 1: // If index.php?page=1 include('page01.php'); // you can change the value to the name of the page break; case 2: // If index.php?page=2 include('page02.php'); // you can change the value to the name of the page break; // etc..... } ?> Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466527 Share on other sites More sharing options...
9999 Posted February 14, 2008 Author Share Posted February 14, 2008 Thank you very much! Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466536 Share on other sites More sharing options...
Northern Flame Posted February 14, 2008 Share Posted February 14, 2008 you're welcome Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466541 Share on other sites More sharing options...
9999 Posted February 14, 2008 Author Share Posted February 14, 2008 Oh, one last question: What is the advantage of doing this versus the traditional method? Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466558 Share on other sites More sharing options...
Northern Flame Posted February 14, 2008 Share Posted February 14, 2008 to be honest i prefer the traditional method. i've noticed i get better page ranking on google and its better for SEO to have a keyword in the url, such as http://www.website.com/keyword.php but other than that i dont see any differences Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466561 Share on other sites More sharing options...
9999 Posted February 14, 2008 Author Share Posted February 14, 2008 Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466566 Share on other sites More sharing options...
Northern Flame Posted February 14, 2008 Share Posted February 14, 2008 k, you're welcome Quote Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466567 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.