-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
39 lines (33 loc) · 1.16 KB
/
.htaccess
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
33
34
35
36
37
38
39
##
# .htaccess
#
# This file provides mapping from xml to php for all front-end sites of XMLArsenal
#
# @author Amras Taralom <[email protected]>
# @version 1.0, last modified 2009/11/26
# @package XMLArsenal
# @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
#
##
# set index.xml as start document and prevent browsing
DirectoryIndex index.xml index.php index.html index.htm
Options -Indexes
# put rw-engine to action
RewriteEngine On
# catch the language selector and login whereveryou are...
RewriteCond %{QUERY_STRING} ^locale=
RewriteRule /* languageselect.php?query=%{QUERY_STRING}
RewriteCond %{QUERY_STRING} login=1
RewriteRule /* login.php?query=%{QUERY_STRING}
RewriteCond %{QUERY_STRING} logout=1
RewriteRule /* logout.php?query=%{QUERY_STRING}
# rules for the xml/php translation
# but ONLY for main dir, not for other dirs
RewriteCond %{REQUEST_URI} !^(\/strings\/)
RewriteCond %{REQUEST_URI} !^(\/data\/)
RewriteCond %{REQUEST_URI} !^(\/layout\/)
RewriteRule ^(.*).xml \/$1.php?%{QUERY_STRING}
#error handeling
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php