-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
27 lines (26 loc) · 864 Bytes
/
.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
# Configuracion de php5
<IfModule php5_module>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
# php_admin_flag allow_url_fopen Off
php_value include_path .
</IfModule>
# Reglas de re-escritura
<IfModule rewrite_module>
RewriteEngine On
#
# Redirect http to https:
RewriteCond %{HTTP} On
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
#
# block access to critical directories
RewriteCond %{REQUEST_URI} /(config|logs|server|.htaccess)/
RewriteRule ^(.*) - [F,L]
#
# forbid direct access to session/admin pages without enterin via index.php
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://acceso.lab.dit.upm.es/labo_sphere [NC]
RewriteRule ^/PublicFiles/ /forbidden.html
</IfModule>