Youplablog

Aller au contenu | Aller au menu | Aller à la recherche

dimanche 18 mars 2007

PHP, jolies URLs et référencement

Reprise de la vie du blog, mais que vaguement

Depuis le jour où je me suis rendu compte que la négociation de contenu existait, j'ai essayé d'en profiter pour utiliser le plus possible des URLs sans extension[1]. Et pour ça, j'ai changé tous mes liens internes en leur version sans extension. Mais finalement, je n'empêche personne d'utiliser les extensions (même si personne ne tape les urls à la main).

Et puis j'ai lu cet article de WebRankInfo sur le duplicate content. Et plutôt que d'utiliser page par page la fonction redirection_301_si_besoin() qui renseigne la "bonne" URL, je me suis dit que c'était possible de gérer ça une bonne fois pour toute. Et donc, quelques expressions régulières plus loin, voilà le résultat.

Incluez ces quelques lignes tout en haut du fichier-que-vous-incluez-partout (celui présent dans tout petit site perso développé à la mimine en php...), et pouf pouf, à vous les jolies URL !

[1] Pour le jour où je ne fais plus de php, mes URI resteront cool, et puis parce que c'est beau (sisi, je vous assure)

dimanche 23 avril 2006

Bah merde alors !

Ya plus rien ?

Bah non.

vendredi 23 septembre 2005

C++, c'est aussi pour ça qu'on t'aime

basic/BasStatMgr.cpp:116: error: no match for 'operator=' in 'itrAName = (((std::map<KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator, std::less<KIT::BasStatMgr::Category>, std::allocator<std::pair<const KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator> > >*)(&itrByName)->std::_Rb_tree_iterator<_Tp>::operator-> [with _Tp = std::pair<const std::string, std::map<KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator, std::less<KIT::BasStatMgr::Category>, std::allocator<std::pair<const KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator> > > >]()) + 8u)->std::map<_Key, _Tp, _Compare, _Alloc>::insert [with _Key = KIT::BasStatMgr::Category, _Tp = KIT::BasStatMgr::Indicator, _Compare = std::less<KIT::BasStatMgr::Category>, _Alloc = std::allocator<std::pair<const KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator> >](((const std::pair<const KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator>&)((const std::pair<const KIT::BasStatMgr::Category, KIT::BasStatMgr::Indicator>*)(&aName_value_type(((const KIT::BasStatMgr::Category&)(+(&itrCat)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const KIT::BasStatMgr::Category*, _Container = std::vector<KIT::BasStatMgr::Category, std::allocator<KIT::BasStatMgr::Category> >]())), ((const KIT::BasStatMgr::Indicator&)((const KIT::BasStatMgr::Indicator*)(&Indicator(((const std::string&)(+(&itrName)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const std::string*, _Container = std::vector<std::string, std::allocator<std::string> >]())), (&itrCat)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const KIT::BasStatMgr::Category*, _Container = std::vector<KIT::BasStatMgr::Category, std::allocator<KIT::BasStatMgr::Category> >](), 1, (&itrTotal)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const AMD_Double*, _Container = std::vector<AMD_Double, std::allocator<AMD_Double> >](), (&itrTotal)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const AMD_Double*, _Container = std::vector<AMD_Double, std::allocator<AMD_Double> >](), (&itrTotal)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = const AMD_Double*, _Container = std::vector<AMD_Double, std::allocator<AMD_Double> >]())))))))))'