L’URL rewriting + site map

Le 17 octobre 2006

L’URL rewriting + site map

SiteMap:

Faire un siteMaps de son site:
http://www.xml-sitemaps.com

A retrouver: le script CGI qui gènere des siteMap tout seul

L’URL rewriting:

tout savoir sur l’URL rewriting:
http://www.webrankinfo.com/analyses/autres/url-rewriting-debutants.php

exemple: ( mettre dans un fichier .htaccess)
[apache]
RewriteEngine on RewriteBase /

Options +FollowSymlinks
Options -MultiViews
RewriteEngine on

# le test

RewriteRule ^url\.html$ /test.html [L]

#page blog
RewriteRule ^chronique.php$ /blog.php [L]
RewriteRule ^chronique-([a-z]+)-.php$ /blog.php?cat=$1 [L]
RewriteRule ^chronique–([0-9]+).php$ /blog.php?p=$1 [L]
RewriteRule ^chronique-([a-z]+).php$ /blog.php?cat=$1 [L]
RewriteRule ^chronique-([0-9]+).php$ /blog.php?p=$1&cat= [L]
RewriteRule ^chronique-([a-z]+)-([0-9]+).php$ /blog.php?p=$2&cat=$1 [L]

#page blog_detail

RewriteRule ^chronique([0-9]+)-([^.]+).php$ /blog_detail.php?id=$1&titre=$2 [L]
RewriteRule ^chronique([0-9]+)-([^.]+).php$ /blog_detail.php?id=$1&titre=$2 [L]

#page memo
RewriteRule ^memo-([a-z]+)-.php$ /memo.php?cat=$1 [L]
RewriteRule ^memo–([0-9]+).php$ /memo.php?p=$1 [L]
RewriteRule ^memo-([a-z]+).php$ /memo.php?cat=$1 [L]
RewriteRule ^memo-([0-9]+).php$ /memo.php?p=$1&cat= [L]
RewriteRule ^memo-([a-z]+)-([0-9]+).php$ /memo.php?p=$2&cat=$1 [L]

[/apache]

Divers ( Vu : 2564 fois )

Commentaires

Une Réponse à “L’URL rewriting + site map”

  1. balfhrdpca on 1 mars 2007 11:18

    Hi! Very nice site! Thanks you very much!

Répondre