Htaccess

From Fxp Wiki

Jump to: navigation, search
Voici mon fichier .htaccess situé à la racine de mon site (donc au dessus du dossier mediawiki). On y trouvera les règles de réécriture d'URL, qui me servent pour enlever le index.php et mettre des slash à la place des paramêtres "id" ou "page". Il fonctionne en lien avec le LocalSettings.php file.
Here is my .htaccess file, located at the root of my site (that is above the mediawiki folder). It contains the rewriting rules for URL, to avoid the index.php and the parameters "id" or "page". It works with the LocalSettings.php file.
 
Options FollowSymLinks
RewriteEngine on
RewriteRule (.+)\.cgi$ /cgi-bin/cgiwrap/fxparlant/$1.cgi
RewriteRule (.+)\.php5$ /cgi-bin/cgiwrap/fxparlant/cgi/php5.cgi/$1.php5
 
# Rewrite wiki?xxx as wiki/index.php?xxx and stop
#RewriteRule ^mediawiki$ mediawiki/index.php [L]
#RewriteRule ^mediawiki/$ /mediawiki/index.php [L]
 
# Don't rewrite requests for files in MediaWiki subdirectories,
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/(doku|phpmyadmin|phpBB2|static|pivot|phpinfo\.php|phpinfo\.php5)
RewriteCond %{REQUEST_URI} !^/mediawiki/(stylesheets|images|skins)/
RewriteCond %{REQUEST_URI} !^/mediawiki/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt
 
# Rewrite any article as wiki/index.php/article and stop
#RewriteRule ^(.*)$ /mediawiki/index.php/$1?% {QUERY_STRING} [L]
RewriteRule ^(.*) /mediawiki/index.php?title=$1 [L,QSA]
#RewriteRule ^mediawiki/(.*) /mediawiki/index.php?title=$1 [L]
 
Personal tools