Outils pour utilisateurs

Outils du site


informatique:apache

Ceci est une ancienne révision du document !


Apache (httpd)

Tips

Don't log

Si c'est pour un log apache, essayes un truc dans ce style ( à mettre dans la la conf du site apache où tu veux gérer les fichiers à ne pas stocker ) là, dans l'exemple, ça ne stocke pas les .gif , .css .js .jpg & .swf

SetEnvIf Request_URI “.gif$” dontlog SetEnvIf Request_URI “.css$” dontlog SetEnvIf Request_URI “.js$” dontlog SetEnvIf Request_URI “.jpg$” dontlog SetEnvIF Request_URI “.swf$” dontlog

CustomLog /var/log/httpd/www.domaine.tld-access_log “combined” env=!dontlog

PATH_INFO et Rewrite

RewriteEngine on
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php5/$1 [L]
RewriteRule ^$ index.php5/ [L]

Rediriger toutes les requêtes

How to redirect an entire server or directory to a single URL ?

The best option is to use the standard Apache module mod_rewrite. If that module is compiled in, the following lines

RewriteEngine On
RewriteRule (.*) http://httpd.apache.org/$1 [R]

will send an HTTP 302 Redirect back to the client, and no matter what they gave in the original URL, they'll be sent to “http://www.apache.org/”.

Voir http://httpd.apache.org/docs/1.3/misc/howto.html#redirect pour tous les détails.

informatique/apache.1250589929.txt.gz · Dernière modification : 19/05/2012 00:15 (modification externe)

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki