Web

Caractéristiques et fonctionnalités

Listes de caractéristiques piquées chez les autres :

Tips

Jolis URLs

avec PATH_INFO

avec MOD_REWRITE

Exemple pris sur DokuWiki :

RewriteEngine on
#
## Not all installations will require the following line.  If you do, 
## change "/dokuwiki" to the path to your dokuwiki directory relative
## to your document root.
RewriteBase /
#
## If you enable DokuWikis XML-RPC interface, you should consider to
## restrict access to it over HTTPS only! Uncomment the following two
## rules if your server setup allows HTTPS.
#RewriteCond %{HTTPS} !=on
#RewriteRule ^lib/exe/xmlrpc.php$      https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
#
RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php

Interdire le cache des pages sur le browser

J'ai essayé pas mal de chose pour empêcher le cache de page sur le browser, de façon qu'un “back” force un appel au serveur.

Cette formule fonctionne en HTTP :

header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
// Note that HTTP/1.0 caches might not implement Cache-Control and might only implement Pragma: no-cache
header('Pragma: no-cache');
informatique/web.txt · Dernière modification: 19/05/2012 00:18 (modification externe)
 
Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante : CC0 1.0 Universal
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki