Search Engine Friendly URLs with PHP

Nov 11, 2008 | Tags: SEO, PHP | del.icio.us del.icio.us | digg Digg

2. Give Each Article a Filename

It is obvious that if you want Search Engine Friendly URLs, you should assign a filename to each of your articles. Maybe it's something like:

final-war-of-the-roman-republic.html
Decline_of_The_Roman_Empire
Richard-1-of-England

You do this by adding a column to your article table:

filename VARCHAR(45) NOT NULL

Also add an entry box in your article form for this field. When you're writing a new article, fill this field with the filename for your article. Note that this field should be unique. A filename cannot be assigned to two or more articles.

Later you can refer your article with http://yourdomain.com/Decline_of_The_Roman_Empire, for example.

In this page

  1. Introduction
  2. Give Each Article a Filename
  3. Using Apache's mod_rewrite
  4. The Wrapper Script
  5. Results
  6. Conclusion
Leave a comment

Tags

Recent Posts

  1. OpenCV Utility: Reading Image Pixels Value
  2. OpenCV Circular ROI
  3. OpenCV 2.0 Installation on Windows XP and Visual Studio 2008
  4. Runtime ROI Selection using Mouse
  5. Real Time Eye Tracking and Blink Detection
View Archives

About the Author

avatar Cool PHP programmer writing cool PHP scripts. Feel free to contact
Tel. +62 31 8662872
+62 856 338 6017
ICQ 489571630
Skype dede_bl4ckheart
Yahoo dede_bl4ckheart
Google nashruddin.amin

Recommended Sites:

Hacker's HTTP Client
HTML and CSS Tutorials
Stop Dreaming Start Action
Online Quran and Translation