Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

95 lines (77 sloc) 5.094 kB
# Note this file should be symlinked from the dekiwiki root
# Example: ln -s /home/foo/mdn/configs/htaccess /var/www/dekiwiki/.htaccess
#
# Make sure AllowOverride has FileInfo
ReWriteEngine On
RewriteBase /
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?addons/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?demos.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?docs/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?logout/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?mobile/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?mozilla/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?search/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?web/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|hr|hu|id|ja|ko|nl|pl|ro|sl|sq|th|zh-TW|zh-CN)/)?learn.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(admin(/.*)?)$ /mwsgi/$1 [PT,L]
# PeteE: redirect feeds to a feeds disabled page
RewriteCond %{REQUEST_URI} ^/Special:Article$ [NC]
RewriteCond %{QUERY_STRING} type=feed [NC]
RewriteRule (.*) https://developer.mozilla.org/deki/feeds_disabled.php? [L,R]
RewriteCond %{REQUEST_URI} ^/index.php$ [NC]
RewriteCond %{QUERY_STRING} title=Special:Article [NC]
RewriteCond %{QUERY_STRING} type=feed [NC]
RewriteRule (.*) https://developer.mozilla.org/deki/feeds_disabled.php? [L,R]
RewriteCond %{REQUEST_URI} ^/Special:Watchlist$ [NC]
RewriteCond %{QUERY_STRING} type=feed [NC]
RewriteRule (.*) https://developer.mozilla.org/deki/feeds_disabled.php? [L,R]
RewriteCond %{REQUEST_URI} ^/index.php$ [NC]
RewriteCond %{QUERY_STRING} title=Special:Watchlist [NC]
RewriteCond %{QUERY_STRING} type=feed [NC]
RewriteRule (.*) https://developer.mozilla.org/deki/feeds_disabled.php? [L,R]
RewriteCond %{REQUEST_URI} ^/@api/deki/pages/[0-9]+/feed(/)?$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/@api/deki/pages/[0-9]+/feed/new(/)?$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/@api/deki/users/[0-9]+/feed(/)?$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/@api/deki/users/[0-9]+/feed/new(/)?$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/@api/deki/users/[0-9]+/favorites/feed(/)?$ [NC]
RewriteRule (.*) https://developer.mozilla.org/deki/feeds_disabled.php? [L,R]
# END FEEDS DISABLED
RewriteRule ^patches(.*) data/www/patches$1 [L]
RewriteRule ^presentations(.*) data/www/presentations$1 [L]
RewriteRule ^samples(.*) data/www/samples$1 [L]
RewriteRule ^diagrams(.*) data/www/diagrams$1 [L]
RewriteRule ^devnews(.*) data/www/devnews$1 [L]
RewriteRule ^web-tech(.*) data/www/web-tech$1 [L]
RewriteRule ^css(.*) data/www/css$1 [L]
RewriteRule ^En/JavaScript/Reference/Objects/Array$ en/JavaScript/Reference/Global_Objects/Array [R=301,L,NC]
RewriteRule ^En/JavaScript/Reference/Objects$ en/JavaScript/Reference/Global_Objects/Object [R=301,L,NC]
RewriteRule ^En/Core_JavaScript_1\.5_Reference/Objects/(.*) en/JavaScript/Reference/Global_Objects/$1 [R=301,L,NC]
RewriteRule ^En/Core_JavaScript_1\.5_Reference/(.*) en/JavaScript/Reference/$1 [R=301,L,NC]
RewriteRule ^contests/$ http://labs.mozilla.com/contests/extendfirefox/ [R=302]
RewriteRule ^contests/extendfirefox(/.*)? http://labs.mozilla.com/contests/extendfirefox$1 [R=302]
RewriteRule ^es4(/.*)?$ http://wiki.ecmascript.org/ [R]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ En [L,NE,R]
RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$
RewriteRule ^@gui/(.*)$ proxy.php?path=$1 [L,QSA,NE]
### Begin MDC rewrite rules ###
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^([a-z]{2}|[a-z_]{5})/docs/(.*):(.*)$ $2:$3/$1 [L,QSA,NE,NC,R]
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^([a-z]{2}|[a-z_]{5})/docs/(.*)$ $1/$2 [L,QSA,NE,NC,R]
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^docs/(.*):(.*)$ $1:$2/En [L,QSA,NE,NC,R]
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^docs/(.*)$ En/$1 [L,QSA,NE,NC,R]
### End MDC rewrite rules ###
RewriteCond %{REQUEST_URI} !/(@api|editor|skins|config|deki|media|admin-media)/
RewriteCond %{REQUEST_URI} !/forums
RewriteCond %{REQUEST_URI} !/(redirect|texvc|Version).php
RewriteCond %{REQUEST_URI} !/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !/favicon.ico
RewriteCond %{REQUEST_URI} !/robots.txt
RewriteCond %{REQUEST_URI} !/block_862be.html
RewriteCond %{REQUEST_URI} !/block_f90c2.html
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^(.*)$ index.php?title=$1 [L,QSA,NE]
Jump to Line
Something went wrong with that request. Please try again.