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? 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. 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. 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" 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..... } ?> 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! 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 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? 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 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. 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 Link to comment https://forums.phpfreaks.com/topic/91018-questions-about-page-naming/#findComment-466567 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.