Difference between revisions of "Mediawiki htaccess url rewrite guide"

From ETCwiki
Jump to navigationJump to search
 
 
Line 14: Line 14:
  
 
RewriteRule .*\.ico$ - [L]
 
RewriteRule .*\.ico$ - [L]
 +
[[Category:Mediawiki]]

Latest revision as of 15:44, 25 July 2015

This is how ETCwiki uses the wiki URL rewrite. Running on Apache 2.2 this works.

RewriteEngine On

RewriteCond %{HTTP_HOST} ^etcwiki.org [NC]

RewriteRule ^(.*)$ http://www.etcwiki.org/$1 [L,R=301]

RewriteRule ^wiki/(.*)$ /index.php?title=$1 [PT,L,QSA]

RewriteRule ^wiki/*$ /index.php [L,QSA]

RewriteRule ^/*$ /index.php [L,QSA]

RewriteRule .*\.ico$ - [L]