summaryrefslogtreecommitdiff
path: root/portal/.htaccess
blob: 259d49c16da79c088c2390f8c2b00c3f8c751e5b (plain)
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
40
41
42
43
# The site is dispatched in UTF-8

AddDefaultCharset utf-8

# Pear modules
php_value include_path "/usr/local/www/portal.postgresql.org/pear/lib:."

# Fire up mod_rewrite

RewriteEngine On

# Disallow access to .svn directories
RewriteRule /.svn - [F]

# Rewrite every request except those for
# static files to system/handler.php
RewriteRule ^(favicon\.ico|admin|template|layout|files|external|system/handler\.php|system/rss\.php|system/redir\.php|system/redir2\.php|system/communityfiles\.php|system/oldsearch\.php|sync_timestamp|web_sync_timestamp|mirrors.xml|robots.txt) - [L]

# Redirector
RewriteRule ^redir$ /system/redir.php [QSA,L]
RewriteRule ^redir/([0-9]+)/(h|f)/(.*)$ /system/redir2.php?mirror=$1&type=$2&file=$3 [L]

# Rewrite the requests for RSS feeds
RewriteRule ^(.*)\.rss\.([a-z-]+)$ /system/rss.php?page=$1&lang=$2 [QSA,L]
RewriteRule ^(.*)\.rss$ /system/rss.php?page=$1 [QSA,L]

# Rewrite access to community docs attached files
RewriteRule ^communityfiles/(.*)$ /system/communityfiles.php?page=$1 [QSA,L]

# Rewrite request to the software catalog
RewriteRule ^download/products/(.*)$ /download/products?id=$1 [QSA,L]

# Rewrite the requests with language explicitly set
RewriteRule ^(.*)\.html\.([a-zA-Z_-]+)$ /system/handler.php?page=$1&lang=$2 [QSA]

# exclude server-status so that it can be used for monitoring
RewriteCond	%{REQUEST_URI} 	!^/server-status

# people like typing urls manually - so redirect licence to license
RewriteRule ^about/license$ /about/licence [QSA,L]

# Use handler.php for everything
RewriteRule ^(.*)$ /system/handler.php?page=$1 [QSA,L]