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.
|
||||
|
||||
Reference in New Issue
Block a user