0

I have created a website to display some teacher's profile. Every profile page generate with more dynamic information from database. In my home page I have listed every teachers' profile from database with a link to his complete profile. Eg. index.php?teacherId=21. Now I need to convert from my dynamic pages to basic static HTML pages to get some benefits for my website. Number one is get search engine higher rank to my profile pages. further I need to rename html page with teacher's name. As well as my website has a searching option. It help for users to search teacher profile according to their subjects, grades, town, city, etc. So Can I know, it is possible to create such a searching system to my website after I made my php page to basic HTML pages...

any ideas are greatly appreciated.

7
  • Try making resourceful routes using rewrite rules in your .htaccess file, and if you don't want to keep hitting the database try using caching instead of manually saving html pages. Commented May 30, 2012 at 4:43
  • Please limit your self to one question at a time. There are at least 2separate questions here. Further more a static page from a database seems to be counter intuitive. What happens when you add a new teacher or one is removed? Commented May 30, 2012 at 4:44
  • At the moment I don't use static pages for my profiles. every profile creating dynamically using my CMS. I use only one index.php page to display my every profile. That why I need to change my php pages to html pages. Commented May 30, 2012 at 4:54
  • What benefits do you get from static html pages? Commented May 30, 2012 at 4:54
  • I have heard It is fast loading compare with dynamic pages and its possible to use different page to every profile with different page name. other than only one page in php.. like index.php Commented May 30, 2012 at 5:09

2 Answers 2

2

What you're looking for is friendly URL: SEO Friendly URL

You make URL's like:

/teachers/21/name-of-teacher

Which then internally maps to:

/profile/teachers/index.php?id=21

The ID at the beginning is what you use to load from MySQL; just like how SO does it really :)

Sign up to request clarification or add additional context in comments.

5 Comments

actually I need to convert my php profile pages to HTML pages.
@thara actualy you don't. There are many ways to make dynamic pages SEO friendly. Friendly URLS are just a start, as are dynamic sitemaps you can send to search engines when content is updated. For Example take this site, StackOverflow; questions here rank very well on search engines and not a single one would be a static HTML file
Ok.. I have only same file names for my profile pages.. like this /profile/teacher/index.php?id=33 and i need to create my pages /profile/teacher/teacher_name.html like wise. can I possible to do it..
@thara see my updated answer, you don't have to make static pages just for SEO purpose ... the faster loading is probably not worth the simplicity of keeping it the way it is
@thara please read about URL rewriting before asking questions. You create rules to be matched by your server, which then internally maps them to existing files. You don't need to create HTML files for every teacher. You DO NOT need to create HTML files for every teacher. There are little benefits to doing things the way you suggest, and many disadvantages. Please do your homework and read articles and tutorials on the subject before insisting on a stupid solution.
0

Investigate MVC frameworks for PHP. These will give you your search engine friendly urls.

Two that spring to mind are :

  1. Zend
  2. Cake

There are many more, like this list for starters!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.