# AUTH
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /var/www/vhosts/domain.fr/subdomains/ysm/httpdocs/.htpasswd
AuthGroupFile /dev/null
#require valid-user
# URL REWRITING
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !www.domain.fr$
RewriteRule (.*)
http://www.domain.fr/$1 [R=301,L]
RewriteRule ^([0-9]{1,3})(-[a-z0-9-_]+)?/?$ index.php?id=$1 [L,QSA,NC]
RewriteRule ^([a-z0-9-_]+)/?$ index.php?section=$1 [L,QSA,NC]
RewriteRule ^([a-z0-9-_]+)/([0-9]{1,3})(-[a-z0-9-_]+)?/?$ index.php?section=$1&$
RewriteRule ^([a-z0-9-_]+)/([0-9]{4})/?$ index.php?section=$1&year=$2 [L,QSA,NC]
RewriteRule ^([a-z0-9-_]+)/([0-9]{4})/([0-9]{2})/?$ index.php?section=$1&year=$$
RewriteRule ^([a-z0-9-_]+)/([0-9]{4})/([0-9]{2})/([0-9]{1,3})(-[a-z0-9-_]+)?/?$$
RewriteRule ^([a-z0-9-_]+)/([a-z0-9-_]+)/?$ index.php?section=$1&page=$2 [L,QSA$
RewriteRule ^([a-z0-9-_]+)/([a-z0-9-_]+)/([a-z-]+)/?$ index.php?section=$1&page$
RewriteRule ^([a-z0-9-_]+)/([a-z0-9-_]+)/([0-9]{1,3})(-[a-z0-9-_]+)?/?$ index.p$
RewriteRule ^([a-z0-9-_]+)/([a-z0-9-_]+)/([a-z-]+)/([0-9]{1,3})(-[a-z0-9-_]+)?/$
# RESIZE
RewriteRule ^medias/thumb/(.*)$ php/resize3.php?width=auto&height=120&max_width$
RewriteRule ^medias/square/(.*)$ php/resize3.php?width=150&height=150&method=cr$
#RewriteRule ^medias/original/(.*)$ medias/domain.fr/medias/$1 [L,NC,QSA,NE]
# GZIP
AddType application/x-httpd-php .php .htm .html
php_flag zlib.output_compression On
php_value zlib.output_compression_level 9
# ETAG
FileETag none
# MIN : MINIFY + GZIP + EXPIRES (CSS + JS)
RewriteRule ^(js|css)/([0-9.]+)/([a-z0-9]+).(js|css)$ /min/?g=$3.$4&v=$2
# DIRECTORY INDEX
DirectoryIndex index.php