SEO Friendly URL

I love the way SO gives link to question Like this question have the link where the question title is seo-friendly-url

I’m creating a blog where i want to give the link in the same way SO do, how to do that in PHP ?
Any suggestion is welcome 🙂

Table Structure

  • ID
  • Title
  • Tags
  • Category
  • UID

I’m using PHP/APACHE and no framework ! I dont want to use any blog, want to create my own

SEO friendly URL

Which is more seo friendly URL from below Can anyone help?

CakePHP friendly seo url

I want to make my url seo friendly. change for Everything works fine, but probably I’m doing something wrong with routing, because when after cli

Joomla SEO Friendly URL Problem

In my current Joomla Project, I set the SEO friendly in URL in global configuration in Joomla 1.5. Everything worked fine except the search. When I search something, the url shows as old one (not like

SEO friendly URL issue

I have a problem in after creating SEO friendly links in my site. here is the .htaccess file codes. RewriteEngine On RewriteRule ^www/category/([0-9]+)/(.*?).html$ www/product/productlist.php?category

cakephp plugin to make URL SEO friendly

How do I make cakephp website URL SEO friendly? Is there a plugin available for cakephp 1.2.6

Convert to SEO friendly URL

I’m trying to make my website URLs SEO-friendly, and I’m having problems… How can I change this URL: To this kind of URL: http://www.example

SEO friendly url in rails

I’m building a website for last minutes holidays. Now I’m busy building seo friendly url. Each last minutes has one country and one city. The way I want to let url’s look like is te following: For the

Producing SEO friendly URL in javascript

I have a PHP function that converts a URL to an SEO friendly URL: function seo_url($input){ $input = str_replace(array(‘, -), , $input); //remove single quote and dash $input = mb_convert_case($

SEO Friendly URL Rewriter Parameters

I would appreciate you advice on how to incorporate parameters into SEO Friendly URLs We have decided to have the techie parameters first, followed by the SEO Slug /product/ABC123/fly-your-own-hel

SEO friendly URL in Classic ASP?

I have website developed in classic ASP. The URL is not SEO friendly at present. Please suggest how I can make the SEO friendly URL for my website in ASP. Is there any supporting functions which can h


First of all you didn’t write what framework do you user. I describe what you want to do on Symfony framework

First solution

  1. Change routes to routing engine understand the “Nice urls”
  2. Change controller’s action which is responsible for searching the right record with your’s article

You can enhance the solution by declare sluging function and use it directly in routes

Second solution

Use any blogging solution which already supports it – as wrote ceejayoz

You could use PHP and Apache together. Specifically Apache Forcetype. This article explains how to use Forcetype.

Let’s say you have a URL like this:

The .htacess file would look like this:

<Files article>
  ForceType application/x-httpd-php 

The PHP would look something like this:

    list(,$slug) = explode("/", $_SERVER['REQUEST_URI']);

The value of $slug would be seo-friendly-example. This would be a key in your database for that article.

I’m not sure why people are being so deliberately obtuse here…

What you are looking for is mod_rewrite, an apache module for URL rewriting.

In your .htaccess file (you might need to make it) put:

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^blog//([0-9]+)//.*$ /blog.php?post=$1 [L]

This means when you go to /blog/10/any-old-bit-of-text/ behind the scenes it is identical to if you visited /blog.php?post=10.

The ([0-9]+) bit is called a regular expression (or regex), and matches any number. The .* means match anything. The ^ anchors to the start of the query and the $ anchors to the end. slashes (/) are escaped as //.