Update .htaccess files
This commit is contained in:
+116
-62
@@ -1,11 +1,11 @@
|
||||
Order Deny,Allow
|
||||
Deny from 195.66.157.234
|
||||
Deny from 148.251.50.77
|
||||
Deny from 46.4.83.150
|
||||
Deny from 46.245.132.179
|
||||
Deny from 169.149.213.31
|
||||
### Begin: Compression ###
|
||||
|
||||
SetEnv TYPO3_CONTEXT "Production"
|
||||
# Compressing resource files will save bandwidth and so improve loading speed especially for users
|
||||
# with slower internet connections. TYPO3 can compress the .js and .css files for you.
|
||||
# *) Uncomment the following lines and
|
||||
# *) Set $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = 9 for the Backend
|
||||
# *) Set $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 9 together with the TypoScript properties
|
||||
# config.compressJs and config.compressCss for GZIP compression of Frontend JS and CSS files.
|
||||
|
||||
<FilesMatch "\.js\.gzip$">
|
||||
AddType "text/javascript" .gzip
|
||||
@@ -24,6 +24,15 @@ AddEncoding gzip .gzip
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# Compress all output labeled with one of the following media types.
|
||||
#
|
||||
# (!) For Apache versions below version 2.3.7 you don't need to
|
||||
# enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
|
||||
# and `</IfModule>` lines as `AddOutputFilterByType` is still in
|
||||
# the core directives.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
|
||||
|
||||
<IfModule mod_filter.c>
|
||||
AddOutputFilterByType DEFLATE application/atom+xml \
|
||||
application/javascript \
|
||||
@@ -60,10 +69,17 @@ AddEncoding gzip .gzip
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddEncoding gzip svgz
|
||||
AddEncoding gzip svgz
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
### End: Compression ###
|
||||
|
||||
|
||||
|
||||
### Begin: Browser caching of resource files ###
|
||||
|
||||
# This affects Frontend and Backend and increases performance.
|
||||
<IfModule mod_expires.c>
|
||||
|
||||
ExpiresActive on
|
||||
@@ -121,6 +137,12 @@ AddEncoding gzip .gzip
|
||||
|
||||
</IfModule>
|
||||
|
||||
### End: Browser caching of resource files ###
|
||||
|
||||
|
||||
### Begin: MIME types ###
|
||||
|
||||
# Proper MIME types for all files
|
||||
<IfModule mod_mime.c>
|
||||
|
||||
# Data interchange
|
||||
@@ -172,34 +194,46 @@ AddEncoding gzip .gzip
|
||||
|
||||
</IfModule>
|
||||
|
||||
# UTF-8 encoding
|
||||
AddDefaultCharset utf-8
|
||||
<IfModule mod_mime.c>
|
||||
AddCharset utf-8 .atom .css .js .json .manifest .rdf .rss .vtt .webapp .webmanifest .xml
|
||||
</IfModule>
|
||||
|
||||
### End: MIME types ###
|
||||
|
||||
|
||||
|
||||
### Begin: Cross Origin ###
|
||||
|
||||
# Send the CORS header for images when browsers request it.
|
||||
<IfModule mod_setenvif.c>
|
||||
<IfModule mod_headers.c>
|
||||
SetEnvIf Origin ":" IS_CORS
|
||||
Header set Access-Control-Allow-Origin "*" env=IS_CORS
|
||||
<FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
|
||||
SetEnvIf Origin ":" IS_CORS
|
||||
Header set Access-Control-Allow-Origin "*" env=IS_CORS
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
#<IfModule mod_setenvif.c>
|
||||
# <IfModule mod_headers.c>
|
||||
# <FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
|
||||
# SetEnvIf Origin ":" IS_CORS
|
||||
# Header set Access-Control-Allow-Origin "*" env=IS_CORS
|
||||
# </FilesMatch>
|
||||
# </IfModule>
|
||||
#</IfModule>
|
||||
#
|
||||
#<IfModule mod_headers.c>
|
||||
# <FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
|
||||
# Header set Access-Control-Allow-Origin "*"
|
||||
# </FilesMatch>
|
||||
#</IfModule>
|
||||
# Allow cross-origin access to web fonts.
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
### End: Cross Origin ###
|
||||
|
||||
|
||||
|
||||
### Begin: Rewriting and Access ###
|
||||
|
||||
# You need rewriting, if you use a URL-Rewriting extension (RealURL, CoolUri).
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
# Enable URL rewriting
|
||||
RewriteEngine On
|
||||
|
||||
# Begin ep-events.de redirects
|
||||
@@ -895,7 +929,6 @@ AddDefaultCharset utf-8
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ski\-wochenenden\.de [NC]
|
||||
RewriteCond %{QUERY_STRING} ^tx_epproducts_product_detail
|
||||
RewriteRule ^(.*)$ https://www.ski-wochenenden.de/$1? [L,R=302,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ski\-wochenenden\.de [NC]
|
||||
RewriteRule ^(.*)/product/(.*)$ https://www.ski-wochenenden.de/$1? [L,R=301,NC]
|
||||
RewriteCond %{HTTP_HOST} ^www\.ski\-wochenenden\.de [NC]
|
||||
@@ -959,38 +992,27 @@ AddDefaultCharset utf-8
|
||||
# Begin ep-reisen redirects
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^sites/default/files/ - [L,R=410,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule php3$ - [L,R=410,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^internet/privat - [L,R=410,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteCond %{QUERY_STRING} ^(quicktabs|reise)
|
||||
RewriteRule ^(.*)$ https://www.ep-reisen.de/? [L,R=301,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule , https://www.ep-reisen.de/? [L,R=301,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule reise_\d+\.htm$ https://www.ep-reisen.de/? [L,R=301,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^sites/default/files/ - [L,R=410,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^(.*)/www.ski-wochenenden.de/index.php https://www.ep-reisen.de/$1? [L,R=301,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^ajax/search/pricetable/json/(.*)$ https://www.ep-reisen.de/ajax/table/pricetable/json/$1 [L,R=301,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^(.*)/product/(.*)$ https://www.ep-reisen.de/$1? [L,R=301,NC]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^skireisen/reiseziele/frankreich/les-deux-alpes/unichamp-eventreise/product/unichamp/lours-blanc/485/www.ski-wochenenden.de/index.php https://www.ep-reisen.de/skireisen/reiseziele/frankreich/les-deux-alpes/unichamp-eventreise/detail/5/45/? [L,R=301,NC]
|
||||
|
||||
RedirectMatch 301 ^/www.ep-reisen.de https://www.ep-reisen.de/
|
||||
RedirectMatch 301 ^/infos/anreise/ep-skibus/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/infos/reiseinfos/ski-busreisen/$1
|
||||
RedirectMatch 301 ^/infos/leihmaterial/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/infos/reiseinfos/skiausruestung-leihen/$1
|
||||
@@ -1004,11 +1026,9 @@ AddDefaultCharset utf-8
|
||||
RedirectMatch 301 ^/reiseinfos/skipaesse/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/infos/reiseinfos/skiurlaub-mit-skipass/$1
|
||||
RedirectMatch 301 ^/reisen-fuer-gruppen/fuer-privatgruppen/ski-family/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/reisen-fuer-gruppen/skireisen-fuer-gruppen/gruppen-skifreizeit/familien/$1
|
||||
RedirectMatch 301 ^/reisen-fuer-gruppen/selbstversorger-haeuser-im-sommer/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/reisen-fuer-gruppen/gruppenhaeuser/$1
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^reiseziele/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/reiseziele/$1 [L,R=301,NC]
|
||||
#RedirectMatch 301 ^/reiseziele/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/reiseziele/$1
|
||||
|
||||
RedirectMatch 301 ^/reiseziele/winter/frankreich/3-vallees-val-thorens/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/reiseziele/frankreich/trois-vallees/val-thorens/$1
|
||||
RedirectMatch 301 ^/reiseziele/winter/frankreich/3-vallees-val-thorens/val-thorens/les-montagnettes-ski-boarderweek/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/reiseziele/frankreich/trois-vallees/ski-boarderweek-eventreise/$1
|
||||
RedirectMatch 301 ^/reiseziele/winter/frankreich/les-deux-alpes/les-deux-alpes/appartements-village-les-deux-alpes/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/reiseziele/frankreich/les-deux-alpes/$1
|
||||
@@ -1095,12 +1115,9 @@ AddDefaultCharset utf-8
|
||||
RedirectMatch 301 ^/infos/schneehoehen-aktuell/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/infos/allgemeine-infos/schneehoehen/$1$2
|
||||
RedirectMatch 301 ^/jobs-praktika-bei-ep/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/karriere-job-reisen/$1$2
|
||||
RedirectMatch 301 ^/jobs-praktika-bei-ep/bewerbungsformular-saisonteamer-1617/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/karriere-job-reisen/jobs-in-den-bergen/saisonteamer-winter/bewerbungsformular-$2saisonteamer-winter/$1
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^kontakt https://www.ep-reisen.de/skireisen/unternehmen/kontakt/$1 [L,R=301,NC]
|
||||
|
||||
#RedirectMatch 301 ^/kontakt/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/kontakt/$1$2
|
||||
|
||||
RedirectMatch 301 ^/mayrhofen-gaestehaus-kroell-fewopension/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/reiseziele/oesterreich/zillertal/ferienwohnungen-kroell/$1$2
|
||||
RedirectMatch 301 ^/merkzettel/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/$1$2
|
||||
RedirectMatch 301 ^/newsletter-anmeldung/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/kontakt/katalog-newsletter/$1$2
|
||||
@@ -1128,10 +1145,8 @@ AddDefaultCharset utf-8
|
||||
RedirectMatch 301 ^/node/67/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/reiseziele/oesterreich/zillertal/mayrhofen/$1$2
|
||||
RedirectMatch 301 ^/node/74/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/infos/reiseinfos/skiurlaub-mit-skipass/$1$2
|
||||
RedirectMatch 301 ^/node/87/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/reiseziele/schweiz/davos-klosters/sportclub-schweizerhaus/$1$2
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^node https://www.ep-reisen.de/? [L,R=301,NC]
|
||||
|
||||
RedirectMatch 301 ^/officeteam/boris-engelhardt/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/ueber-ep-skireise-veranstalter/mitarbeiter-reiseveranstalter-koeln/$1$2
|
||||
RedirectMatch 301 ^/officeteam/christiane-ringe/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/ueber-ep-skireise-veranstalter/mitarbeiter-reiseveranstalter-koeln/$1$2
|
||||
RedirectMatch 301 ^/officeteam/christian-reske/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/unternehmen/ueber-ep-skireise-veranstalter/mitarbeiter-reiseveranstalter-koeln/$1$2
|
||||
@@ -2038,17 +2053,13 @@ AddDefaultCharset utf-8
|
||||
RedirectMatch 301 ^/wochenenden-kurztrips-wwwski-wochenendende/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/reisekonzepte/skiwochenenden/$1$2
|
||||
RedirectMatch 301 ^/reiseziele/winter/schweiz/4-vallees-verbier/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/reiseziele/schweiz/4-vallees/$1$2
|
||||
RedirectMatch 301 ^/Zugfahrt/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?(\?gclid=[a-zA-Z0-9_]+)?$ https://www.ep-reisen.de/skireisen/infos/reiseinfos/ski-busreisen/$1$2
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?ep\-reisen\.de [NC]
|
||||
RewriteRule ^davos/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ https://www.ep-reisen.de/skireisen/reiseziele/schweiz/davos-klosters/ [L,R=301,NC]
|
||||
|
||||
# end ep-reisen redirects
|
||||
|
||||
# Begin snowzone redirects
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?snowzone\.net [NC]
|
||||
RewriteRule ^programm/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ http://www.snowzone.net/les-deux-alpes/programm/$1
|
||||
|
||||
#RedirectMatch 301 ^/davos http://www.snowzone.net/
|
||||
RedirectMatch 301 ^/home/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ http://www.snowzone.net/$1
|
||||
RedirectMatch 301 ^/les-deux-alpes/location/ort/ort-les-deux-alpes/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ http://www.snowzone.net/les-deux-alpes/location/ort/les-deux-alpes/$1
|
||||
@@ -2230,7 +2241,6 @@ AddDefaultCharset utf-8
|
||||
RedirectMatch 301 ^/deux-alpes/unterkunft/centre-muzelle/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ http://www.snowzone.net/les-deux-alpes/reise/unterkuenfte/$1
|
||||
RedirectMatch 301 ^/deux-alpes/unterkunft/centre-bel-alp/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ http://www.snowzone.net/les-deux-alpes/reise/unterkuenfte/$1
|
||||
RedirectMatch 301 ^/les-deux-alpes/reise/zusatzleistungen/anreise/?([a-z]{4}[0-9]{4}[a-zA-Z0-9]*)?$ http://www.snowzone.net/les-deux-alpes/reise/reiseinfos/anreise/$1
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^www\.snowzone\.net [NC]
|
||||
RewriteRule ^reise/zusatzleistungen/skikurs/ https://www.snowzone.net/les-deux-alpes/reise/zusatzleistungen/skifahren-lernen/ [L,R=301,NC]
|
||||
RewriteCond %{HTTP_HOST} ^www\.snowzone\.net [NC]
|
||||
@@ -2873,66 +2883,110 @@ AddDefaultCharset utf-8
|
||||
RewriteRule (.*) https://www.ep-reisen.de/ [R=301,L]
|
||||
# End redirect catchall subdomains
|
||||
|
||||
# Begin force https
|
||||
# Force SSL for all domains
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
# End force https
|
||||
|
||||
# Begin TYPO3 default rules
|
||||
# Store the current location in an environment variable CWD to use
|
||||
# mod_rewrite in .htaccess files without knowing the RewriteBase
|
||||
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
|
||||
RewriteRule ^.*$ - [E=CWD:%2]
|
||||
|
||||
# Rules to set ApplicationContext based on hostname
|
||||
#RewriteCond %{HTTP_HOST} ^dev\.example\.com$
|
||||
#RewriteRule .? - [E=TYPO3_CONTEXT:Development]
|
||||
#RewriteCond %{HTTP_HOST} ^staging\.example\.com$
|
||||
#RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
|
||||
#RewriteCond %{HTTP_HOST} ^www\.example\.com$
|
||||
#RewriteRule .? - [E=TYPO3_CONTEXT:Production]
|
||||
|
||||
# Rule for versioned static files, configured through:
|
||||
# - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']
|
||||
# - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename']
|
||||
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
|
||||
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L]
|
||||
|
||||
# Access block for folders
|
||||
RewriteRule _(?:recycler|temp)_/ - [F]
|
||||
RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F]
|
||||
RewriteRule typo3temp/logs/ - [F]
|
||||
RewriteRule ^(vendor|typo3_src) - [F]
|
||||
RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F]
|
||||
RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]
|
||||
|
||||
# Block access to all hidden files and directories with the exception of
|
||||
# the visible content from within the `/.well-known/` hidden directory (RFC 5785).
|
||||
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
|
||||
RewriteCond %{SCRIPT_FILENAME} -d [OR]
|
||||
RewriteCond %{SCRIPT_FILENAME} -f
|
||||
RewriteRule (?:^|/)\. - [F]
|
||||
RewriteRule (?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
|
||||
|
||||
# Stop rewrite processing, if we are in the typo3/ directory or any other known directory
|
||||
# NOTE: Add your additional local storages here
|
||||
RewriteRule ^(?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
|
||||
|
||||
# If the file/symlink/directory does not exist => Redirect to index.php.
|
||||
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L]
|
||||
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch "(?i:^\.|^#.*#|^(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|^composer\.(?:json|lock)|^ext_conf_template\.txt|^ext_typoscript_constants\.txt|^ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sw[op]|git.*)|.*(?:~|rc))$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Access block for files
|
||||
# Apache < 2.3
|
||||
<IfModule !mod_authz_core.c>
|
||||
<FilesMatch "(?i:^\.|^#.*#|^(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|^composer\.(?:json|lock)|^ext_conf_template\.txt|^ext_typoscript_constants\.txt|^ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*)|.*(?:~|rc))$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_authz_core.c>
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
# Apache ≥ 2.3
|
||||
<IfModule mod_authz_core.c>
|
||||
<If "%{REQUEST_URI} =~ m#(?i:/\.|/\x23.*\x23|/(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|/composer\.(?:json|lock)|/ext_conf_template\.txt|/ext_typoscript_constants\.txt|/ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*)|.*(?:~|rc))$#">
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
</If>
|
||||
</IfModule>
|
||||
|
||||
# Block access to vcs directories
|
||||
<IfModule mod_alias.c>
|
||||
RedirectMatch 404 /\.(?:git|svn|hg)/
|
||||
</IfModule>
|
||||
|
||||
### End: Rewriting and Access ###
|
||||
|
||||
|
||||
|
||||
### Begin: Miscellaneous ###
|
||||
|
||||
# 404 error prevention for non-existing redirected folders
|
||||
Options -MultiViews
|
||||
|
||||
# Make sure that directory listings are disabled.
|
||||
<IfModule mod_autoindex.c>
|
||||
Options -Indexes
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
# Force IE to render pages in the highest available mode
|
||||
Header set X-UA-Compatible "IE=edge"
|
||||
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff2?|xml|xpi)$">
|
||||
Header unset X-UA-Compatible
|
||||
</FilesMatch>
|
||||
|
||||
# Reducing MIME type security risks
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
</IfModule>
|
||||
|
||||
# ETag removal
|
||||
<IfModule mod_headers.c>
|
||||
Header unset ETag
|
||||
</IfModule>
|
||||
FileETag None
|
||||
|
||||
### End: Miscellaneous ###
|
||||
|
||||
|
||||
# Add your own rules here.
|
||||
|
||||
+20
-149
@@ -1,31 +1,3 @@
|
||||
SetEnv TYPO3_CONTEXT "Development"
|
||||
|
||||
#####
|
||||
#
|
||||
# Example .htaccess file for TYPO3 CMS - for use with Apache Webserver
|
||||
#
|
||||
# This file includes settings for the following configuration options:
|
||||
#
|
||||
# - Compression
|
||||
# - Caching
|
||||
# - MIME types
|
||||
# - Cross Origin requests
|
||||
# - Rewriting and Access
|
||||
# - Miscellaneous
|
||||
# - PHP optimisation
|
||||
#
|
||||
# If you want to use it, you have to copy it to the root folder of your TYPO3 installation (if its
|
||||
# not there already) and rename it to '.htaccess'. To make .htaccess files work, you might need to
|
||||
# adjust the 'AllowOverride' directive in your Apache configuration file.
|
||||
#
|
||||
# IMPORTANT: You may need to change this file depending on your TYPO3 installation!
|
||||
# Consider adding this file's content to your webserver's configuration directly for speed improvement
|
||||
#
|
||||
# Lots of the options are taken from https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess
|
||||
#
|
||||
####
|
||||
|
||||
|
||||
### Begin: Compression ###
|
||||
|
||||
# Compressing resource files will save bandwidth and so improve loading speed especially for users
|
||||
@@ -35,13 +7,13 @@ SetEnv TYPO3_CONTEXT "Development"
|
||||
# *) Set $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 9 together with the TypoScript properties
|
||||
# config.compressJs and config.compressCss for GZIP compression of Frontend JS and CSS files.
|
||||
|
||||
#<FilesMatch "\.js\.gzip$">
|
||||
# AddType "text/javascript" .gzip
|
||||
#</FilesMatch>
|
||||
#<FilesMatch "\.css\.gzip$">
|
||||
# AddType "text/css" .gzip
|
||||
#</FilesMatch>
|
||||
#AddEncoding gzip .gzip
|
||||
<FilesMatch "\.js\.gzip$">
|
||||
AddType "text/javascript" .gzip
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.css\.gzip$">
|
||||
AddType "text/css" .gzip
|
||||
</FilesMatch>
|
||||
AddEncoding gzip .gzip
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
# Force compression for mangled `Accept-Encoding` request headers
|
||||
@@ -97,7 +69,7 @@ SetEnv TYPO3_CONTEXT "Development"
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddEncoding gzip svgz
|
||||
AddEncoding gzip svgz
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
@@ -264,6 +236,7 @@ AddDefaultCharset utf-8
|
||||
# Enable URL rewriting
|
||||
RewriteEngine On
|
||||
|
||||
# Force SSL for all domains
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
|
||||
@@ -291,7 +264,7 @@ AddDefaultCharset utf-8
|
||||
# Access block for folders
|
||||
RewriteRule _(?:recycler|temp)_/ - [F]
|
||||
RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F]
|
||||
RewriteRule ^(?:vendor|typo3_src|typo3temp/logs) - [F]
|
||||
RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F]
|
||||
RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]
|
||||
|
||||
# Block access to all hidden files and directories with the exception of
|
||||
@@ -305,109 +278,6 @@ AddDefaultCharset utf-8
|
||||
# NOTE: Add your additional local storages here
|
||||
RewriteRule ^(?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
|
||||
|
||||
### Begin: Static File Cache (preparation) ####
|
||||
|
||||
# Document root configuration
|
||||
RewriteRule .* - [E=SFC_ROOT:%{DOCUMENT_ROOT}]
|
||||
# RewriteRule .* - [E=SFC_ROOT:%{DOCUMENT_ROOT}/t3site] # Example if your installation is installed in a directory
|
||||
|
||||
# Cleanup URI
|
||||
RewriteCond %{REQUEST_URI} ^.*$
|
||||
RewriteRule .* - [E=SFC_URI:/%{REQUEST_URI}]
|
||||
RewriteCond %{REQUEST_URI} ^/.*$
|
||||
RewriteRule .* - [E=SFC_URI:%{REQUEST_URI}]
|
||||
RewriteCond %{REQUEST_URI} ^/?$
|
||||
RewriteRule .* - [E=SFC_URI:/]
|
||||
|
||||
# Cleanup HOST
|
||||
RewriteCond %{HTTP_HOST} ^([^:]+)(:[0-9]+)?$
|
||||
RewriteRule .* - [E=SFC_HOST:%1]
|
||||
|
||||
# Get scheme
|
||||
RewriteCond %{SERVER_PORT} ^443$ [OR]
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} https
|
||||
RewriteRule .* - [E=SFC_PROTOCOL:https]
|
||||
RewriteCond %{SERVER_PORT} !^443$
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
||||
RewriteRule .* - [E=SFC_PROTOCOL:http]
|
||||
|
||||
# Get port (not used at the moment)
|
||||
RewriteRule .* - [E=SFC_PORT:80]
|
||||
RewriteCond %{SERVER_PORT} ^[0-9]*$ [OR]
|
||||
RewriteRule .* - [E=SFC_PORT:%{SERVER_PORT}]
|
||||
|
||||
# Check if the requested file exists in the cache, otherwise default to index.html that
|
||||
# set in an environment variable that is used later on
|
||||
RewriteCond %{ENV:SFC_ROOT}/typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}/%{ENV:SFC_HOST}%{ENV:SFC_URI} !-f
|
||||
RewriteRule .* - [E=SFC_FILE:index.html]
|
||||
|
||||
# Note: https://github.com/lochmueller/staticfilecache/pull/90 (Please check the realurl configuration related to "appendMissingSlash". Perhaps you need an additional "/" in the rule above)
|
||||
# RewriteRule .* - [E=SFC_FILE:/index.html]
|
||||
|
||||
# Set gzip extension into an environment variable if the visitors browser can handle gzipped content and the gz-file exists
|
||||
RewriteRule .* - [E=SFC_GZIP:]
|
||||
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
|
||||
RewriteRule .* - [E=SFC_GZIP:.gz]
|
||||
RewriteCond %{ENV:SFC_ROOT}/typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}/%{ENV:SFC_HOST}%{ENV:SFC_URI}%{ENV:SFC_FILE}%{ENV:SFC_GZIP} !-f
|
||||
RewriteRule .* - [E=SFC_GZIP:]
|
||||
|
||||
# Note: We cannot check realurl "appendMissingSlash" or other BE related settings here - in front of the delivery.
|
||||
# Perhaps you have to check the "SFC_FILE" value and set it to your related configution e.g. "index.html" (without leading slash).
|
||||
# More information at: https://github.com/lochmueller/staticfilecache/pull/28
|
||||
|
||||
### Begin: Static File Cache (main) ####
|
||||
|
||||
# We only redirect URI's without query strings
|
||||
RewriteCond %{QUERY_STRING} ^$
|
||||
|
||||
# It only makes sense to do the other checks if a static file actually exists.
|
||||
RewriteCond %{ENV:SFC_ROOT}/typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}/%{ENV:SFC_HOST}%{ENV:SFC_URI}%{ENV:SFC_FILE}%{ENV:SFC_GZIP} -f
|
||||
|
||||
# NO frontend or backend user is logged in. Logged in users may see different
|
||||
# information than anonymous users. But the anonymous version is cached. So
|
||||
# don't show the anonymous version to logged in users.
|
||||
RewriteCond %{HTTP_COOKIE} !staticfilecache [NC]
|
||||
|
||||
# Uncomment the following line if you use MnoGoSearch
|
||||
#RewriteCond %{HTTP:X-TYPO3-mnogosearch} ^$
|
||||
|
||||
# We only redirect GET requests
|
||||
RewriteCond %{REQUEST_METHOD} GET
|
||||
|
||||
# Rewrite the request to the static file.
|
||||
RewriteRule .* %{ENV:SFC_ROOT}/typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}/%{ENV:SFC_HOST}%{ENV:SFC_URI}%{ENV:SFC_FILE}%{ENV:SFC_GZIP} [L]
|
||||
|
||||
# Do not allow direct call the cache entries
|
||||
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
||||
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
||||
RewriteRule .* - [F,L]
|
||||
|
||||
### Begin: Static File Cache (options) ####
|
||||
|
||||
# Set proper content type and encoding for gzipped html.
|
||||
<FilesMatch "\.gz">
|
||||
<IfModule mod_headers.c>
|
||||
Header set Content-Encoding gzip
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
|
||||
# if there are same problems with ForceType, please try the AddType alternative
|
||||
# Set proper content type gzipped html
|
||||
<FilesMatch "\.html\.gz">
|
||||
ForceType text/html
|
||||
# AddType "text/html" .gz
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.xml\.gz">
|
||||
ForceType text/xml
|
||||
# AddType "text/xml" .gz
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.rss\.gz">
|
||||
ForceType text/xml
|
||||
# AddType "text/xml" .gz
|
||||
</FilesMatch>
|
||||
|
||||
### End: Static File Cache ###
|
||||
|
||||
# If the file/symlink/directory does not exist => Redirect to index.php.
|
||||
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
@@ -418,19 +288,20 @@ AddDefaultCharset utf-8
|
||||
</IfModule>
|
||||
|
||||
# Access block for files
|
||||
<FilesMatch "(?i:^\.|^#.*#|^(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|^composer\.(?:json|lock)|^ext_conf_template\.txt|^ext_typoscript_constants\.txt|^ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sw[op]|git.*)|.*(?:~|rc))$">
|
||||
# Apache < 2.3
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache < 2.3
|
||||
<IfModule !mod_authz_core.c>
|
||||
<FilesMatch "(?i:^\.|^#.*#|^(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|^composer\.(?:json|lock)|^ext_conf_template\.txt|^ext_typoscript_constants\.txt|^ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*)|.*(?:~|rc))$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</IfModule>
|
||||
|
||||
# Apache ≥ 2.3
|
||||
<IfModule mod_authz_core.c>
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
# Apache ≥ 2.3
|
||||
<IfModule mod_authz_core.c>
|
||||
<If "%{REQUEST_URI} =~ m#(?i:/\.|/\x23.*\x23|/(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|/composer\.(?:json|lock)|/ext_conf_template\.txt|/ext_typoscript_constants\.txt|/ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*)|.*(?:~|rc))$#">
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
</If>
|
||||
</IfModule>
|
||||
|
||||
# Block access to vcs directories
|
||||
<IfModule mod_alias.c>
|
||||
|
||||
Reference in New Issue
Block a user