Nico Huber | ee52fbc | 2023-06-24 11:52:57 +0000 | [diff] [blame] | 1 | # :mode=htaccess: |
| 2 | # |
| 3 | # SimpleID |
| 4 | # |
| 5 | # Copyright (C) Kelvin Mo 2009 |
| 6 | # |
| 7 | # This program is free software; you can redistribute it and/or |
| 8 | # modify it under the terms of the GNU General Public |
| 9 | # License as published by the Free Software Foundation; either |
| 10 | # version 2 of the License, or (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | # General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public |
| 18 | # License along with this program; if not, write to the Free |
| 19 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | # |
| 21 | # $Id$ |
| 22 | |
| 23 | # Protect files and directories from prying eyes. |
| 24 | <FilesMatch "(\.(inc|cache|client|identity|xtpl|inc\.php|store\.php|extension\.php)|config\.php|locale)$"> |
| 25 | Order deny,allow |
| 26 | Deny from all |
| 27 | </FilesMatch> |
| 28 | |
| 29 | # Don't show directory listings for URLs which map to a directory. |
| 30 | Options -Indexes |
| 31 | |
| 32 | # Various rewrite rules. |
| 33 | <IfModule mod_rewrite.c> |
| 34 | RewriteEngine on |
| 35 | |
| 36 | # Modify the RewriteBase if you are using SimpleID in a subdirectory and |
| 37 | # the rewrite rules are not working properly. |
| 38 | #RewriteBase /simpleid |
| 39 | |
| 40 | # Pass Authorization header to PHP |
| 41 | RewriteCond %{HTTP:Authorization} ^(.*) |
| 42 | RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] |
| 43 | |
| 44 | # Rewrite URLs |
| 45 | RewriteCond %{REQUEST_FILENAME} !-f |
| 46 | RewriteCond %{REQUEST_FILENAME} !-d |
| 47 | RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] |
| 48 | </IfModule> |
| 49 | |
| 50 | # Switch register_globals to off |
| 51 | php_value register_globals 0 |