99 lines
2.9 KiB
ApacheConf
99 lines
2.9 KiB
ApacheConf
Options +FollowSymlinks -Indexes
|
|
|
|
AddDefaultCharset UTF-8
|
|
|
|
# BEGIN Cache-Control Headers
|
|
### Caching mod_headers + mod_expires
|
|
|
|
<IfModule mod_expires.c>
|
|
|
|
# Turn on Expires and set default to now
|
|
ExpiresActive On
|
|
ExpiresDefault "now"
|
|
|
|
# Set up caching on media files for 1 month
|
|
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|swf)$">
|
|
ExpiresDefault "access plus 1 month"
|
|
</FilesMatch>
|
|
|
|
# Set up caching on images, CSS and JS files for 1 month
|
|
<FilesMatch "\.(gif|jpg|jpeg|png|js|css)$">
|
|
ExpiresDefault "access plus 1 month"
|
|
</FilesMatch>
|
|
|
|
# Set up 1 hour caching on commonly updated files
|
|
<FilesMatch "\.(xml|xsl|html|htm|txt)$">
|
|
ExpiresDefault "access plus 1 hour"
|
|
</FilesMatch>
|
|
|
|
# Force no caching for dynamic files
|
|
<FilesMatch "\.(php|cgi|pl)$">
|
|
ExpiresActive Off
|
|
</FilesMatch>
|
|
</IfModule>
|
|
|
|
<IfModule mod_headers.c>
|
|
|
|
# Remote ETag from headers
|
|
Header unset ETag
|
|
|
|
# Disable ETag for files
|
|
FileETag None
|
|
|
|
# Media files are catchable
|
|
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|swf)$">
|
|
Header append Cache-Control "public"
|
|
</FilesMatch>
|
|
|
|
# Images, css and javascript files are catchable
|
|
<FilesMatch "\.(gif|jpg|jpeg|png|js|css)$">
|
|
Header append Cache-Control "public"
|
|
</FilesMatch>
|
|
|
|
# Commonly updated files are catchable
|
|
<FilesMatch "\.(xml|html|htm|txt)$">
|
|
Header append Cache-Control "public"
|
|
</FilesMatch>
|
|
|
|
# Force no caching for dynamic files
|
|
<FilesMatch "\.(php|cgi|pl|htm)$">
|
|
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
|
|
Header set Pragma "no-cache"
|
|
</FilesMatch>
|
|
|
|
</IfModule>
|
|
# END Expire headers
|
|
|
|
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine On
|
|
|
|
# SEO, remove the subdomain www in URL
|
|
# Exemple : http://www.yourdomain.com/contact redirect 301 to http://yourdomain.com/contact
|
|
# To activate uncomment the following two lines
|
|
#RewriteCond %{HTTP_HOST} ^www.yourdomain.com$
|
|
#RewriteRule ^(.*) http://yourdomain.com/$1 [QSA,L,R=301]
|
|
|
|
# SEO, add the subdomain www in URL
|
|
# Exemple : http://yourdomain.com/contact redirect 301 to http://www.yourdomain.com/contact
|
|
# To activate uncomment the following two lines
|
|
#RewriteCond %{HTTP_HOST} ^yourdomain.com$
|
|
#RewriteRule ^(.*) http://www.yourdomain.com/$1 [QSA,L,R=301]
|
|
|
|
# SEO, to avoid duplicate content with index.php in url
|
|
# Exemple : http://www.yourdomain.com/index.php/contact redirect 301 to http://www.yourdomain.com/contact
|
|
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
|
|
RewriteRule (.?)index\.php/(.*) /$1$2 [R=301,NE,L]
|
|
|
|
# If thelia is installed in a subdirectory (e.g., thelia2)
|
|
# define the RewriteBase below to get a proper URL rewriting
|
|
# RewriteBase /thelia2
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
|
|
|
|
Redirect "/admin_FN5APhpBzO/accueil.php" "/admin/login"
|
|
</IfModule> |