forked from philippe-gilles/PL3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
33 lines (26 loc) · 993 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
28
29
30
31
32
33
# .htaccess PetiLabo v3
SetEnv PHP_VER 5_6
SetEnv REGISTER_GLOBALS 0
Options +FollowSymlinks
Options -Indexes
RewriteEngine on
# Redirection de la page d'accueil vers index.php
RewriteRule ^$ http://%{HTTP_HOST}%{REQUEST_URI}index.php [L,R=301]
RewriteRule ^/$ http://%{HTTP_HOST}%{REQUEST_URI}index.php [L,R=301]
RewriteRule ^admin$ http://%{HTTP_HOST}%{REQUEST_URI}/index.php [L,R=301]
RewriteRule ^admin/$ http://%{HTTP_HOST}%{REQUEST_URI}index.php [L,R=301]
# Réécriture d'URL pour gérer les noms de page (AJAX exclu)
RewriteCond %{THE_REQUEST} !ajax/.*
RewriteCond %{THE_REQUEST} !admin/.*
RewriteRule ^(.*\.php)$ index.php?p=$1 [QSA,L]
# Réécriture d'URL pour gérer le mode administration
RewriteCond %{THE_REQUEST} admin/.*
RewriteRule ^(.*)/(.*\.php)$ index-admin.php?p=$2 [QSA,L]
# Doublon avec l'ini_set PHP pour les cookies de session
<IfModule php5_module>
php_value session.cookie_httponly True
</IfModule>
<Files .htaccess>
Order allow,deny
Deny from all
</Files>