File: .htaccess

package info (click to toggle)
warzone2100 4.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 660,320 kB
  • sloc: cpp: 676,209; ansic: 391,201; javascript: 78,238; python: 16,632; php: 4,294; sh: 4,094; makefile: 2,629; lisp: 1,492; cs: 489; xml: 404; perl: 224; ruby: 156; java: 89
file content (32 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<IfModule mod_rewrite.c>
RewriteEngine on

#RewriteLog "/home/wz/public_html/cache/rewrite.log"
#RewriteLogLevel 5

RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

ErrorDocument 404 /404

DirectoryIndex index.html index.php /fileman/dirindex.php

# Root

RewriteRule ^index(\.php|\.html)?$ / [R=301,L]
RewriteRule ^(w|r|c)/([a-z0-9-]+)/$ /$1/$2 [R=301,L]
RewriteRule ^r/tech\-tree\-chart/?$ /r/tech-tree [R=301,L]

RewriteRule ^([a-z0-9]+)$ $1.php [L,QSA]
RewriteRule ^w/([a-z0-9]+)$ w/w.php?$1 [L,QSA]
RewriteRule ^r/([a-z0-9]+)$ r/r.php?$1 [L,QSA]
RewriteRule ^c/([a-z0-9]+)$ c/c.php?$1 [L,QSA]
RewriteRule ^c/([a-z0-9]+)\-([a-z0-9]+)\-([a-z0-9]+)$ c/t.php?w=$1&b=$2&p=$3&cyborg [L,QSA]
RewriteRule ^u/([a-z0-9]+)\-([a-z0-9]+)\-([a-z0-9]+)$ c/t.php?w=$1&b=$2&p=$3 [L,QSA]
RewriteRule ^b/([a-z0-9]+)$ b/b.php?$1 [L,QSA]
RewriteRule ^d/([a-z0-9]+)$ d/d.php?$1 [L,QSA]
RewriteRule ^bp/([a-z0-9]+)$ bp/bp.php?$1 [L,QSA]
RewriteRule ^r/tech\-tree$ r/graphicaltechtree.html [L,QSA]
RewriteRule ^r/tech\-tree-linear$ r/techtree.html [L,QSA]

</IfModule>