mardi 28 avril 2015

Creating SEO Friendly URLs with .htaccess and php

I'm trying to generate SEO friendly URLs using PHP by using a rewrite in our .htaccess file, but I can't get it to work (I've researched many of the related topics on StackExhange and elsewhere, but to no avail).

I'm attempting to make the content of this URL:

...also display on the cleaner URL version here:

I'm using the following code in my .htaccess file:

RewriteEngine on
RewriteRule ^surety-bonds/([a-zA-Z]+)$ city.php?state=$1&city=$2 [L,NC]

Any idea why the cleaner URL displays a 404 error?


Aucun commentaire:

Enregistrer un commentaire