~primes2h/+junk/ubuntu-qa-website

« back to all changes in this revision

Viewing changes to mini-htaccess

  • Committer: Stéphane graber
  • Date: 2008-05-10 10:16:30 UTC
  • mto: (72.3.27 devel)
  • mto: This revision was merged to the branch mainline in revision 115.
  • Revision ID: stgraber@ubuntu.com-20080510101630-0pt8c7w0rf2uw5yb
Clear update-db.sql, add mini-sample.sql and mini-htaccess

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Apache/PHP/Drupal settings:
 
3
#
 
4
 
 
5
 
 
6
# Protect files and directories from prying eyes.
 
7
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
 
8
  Order allow,deny
 
9
</FilesMatch>
 
10
 
 
11
 
 
12
 
 
13
 
 
14
# Various rewrite rules.
 
15
<IfModule mod_rewrite.c>
 
16
  RewriteEngine on
 
17
 
 
18
# Rule to redirect and favicon.ico request to the main favicon file
 
19
  RewriteCond %{REQUEST_FILENAME} !-f
 
20
  RewriteRule .*favicon.ico /misc/favicon.ico [L]
 
21
 
 
22
# Rule to redirect to the main page when login with the main big login box
 
23
  RewriteCond %{REQUEST_FILENAME} !-f
 
24
  RewriteCond %{HTTP_HOST}   ^www\.your-website\.com [NC]
 
25
  RewriteCond %{HTTP_REFERER} !(/search/) [NC]
 
26
  RewriteCond %{HTTP_REFERER} !(/admin/) [NC]
 
27
  RewriteCond %{HTTP_REFERER} !(/user/) [NC]
 
28
  RewriteCond %{REQUEST_URI} ^/user/[0-9]*$ [NC]
 
29
  RewriteRule ^(.*)$ / [L,R=301]
 
30
 
 
31
# Rule to redirect the idea subdomain to its qapoll/ideas real url
 
32
  RewriteCond %{REQUEST_FILENAME} !-f
 
33
  RewriteCond %{HTTP_HOST}   ^www\.your-website\.com [NC]
 
34
  RewriteCond %{REQUEST_URI} !^/logout [NC]
 
35
  RewriteCond %{REQUEST_URI} !^/user [NC]
 
36
  RewriteCond %{REQUEST_URI} !^/admin [NC]
 
37
  RewriteCond %{REQUEST_URI} !^/qawebsite [NC]
 
38
  RewriteRule ^(.*)$ index.php?q=qapoll/ideas/$1 [QSA]
 
39
 
 
40
  # Rewrite current-style URLs of the form 'index.php?q=x'.
 
41
  RewriteCond %{REQUEST_FILENAME} !-f
 
42
  RewriteCond %{REQUEST_FILENAME} !-d
 
43
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
 
44
 
 
45
</IfModule>
 
46
 
 
47
# $Id: .htaccess,v 1.81.2.3 2007/09/21 12:24:22 drumm Exp $