0

我正在开发 Typo3 版本 4.7.4。当我可以在除 IE 之外的每个浏览器(所有版本)中访问站点的前端时。将自定义的 .htaccess 文件替换为 Typo3 版本 4.7.4 的默认 .htaccess 后,它工作正常。然后我比较了两个文件,除了一些配置之外,我找不到不同的东西。但是,我不确定这些新配置是否杀死了 IE。这是我的新 .htaccess 配置:

#####################################
###     Compression via TYPO3     ###
#####################################
<FilesMatch "\.js\.gzip$">
    AddType "text/javascript" .gzip
</FilesMatch>
<FilesMatch "\.css\.gzip$">
    AddType "text/css" .gzip
</FilesMatch>
AddEncoding gzip .gzip

##################################################
###     Browser caching of resource files     ###
##################################################
<FilesMatch "\.(js|css)$">
  <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault "access plus 7 days"
  </IfModule>
  FileETag MTime Size
</FilesMatch>

########################################
###     Settings for mod_rewrite     ###
########################################
<IfModule mod_rewrite.c>
RewriteEngine On

### Change this path, if your TYPO3 installation is located in a subdirectory of the website root.
#RewriteBase /

### 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 ^fileadmin/(.*/)?_recycler_/ - [F]
RewriteRule ^fileadmin/templates/.*(\.txt|\.ts)$ - [F]
RewriteRule ^typo3conf/ext/[^/]+/Resources/Private/ - [F]

#RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]

############################################################################
###     Redirect all users directly to the https version of the page     ###
############################################################################

RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]

</IfModule>

#############################
###     Miscellaneous     ###
#############################
Options -Indexes

########################################################
###     Disable *.ts files viewing from Frontend     ###
########################################################
<FilesMatch "\.(ts)$">
 order deny,allow
 deny from all
</FilesMatch>

任何想法,将不胜感激。谢谢

4

1 回答 1

0

感谢马霍兹的帮助。

#####################################
###     Compression via TYPO3     ###
#####################################
<FilesMatch "\.js\.gzip$">
    AddType "text/javascript" .gzip
</FilesMatch>
<FilesMatch "\.css\.gzip$">
    AddType "text/css" .gzip
</FilesMatch>
AddEncoding gzip .gzip

##################################################
###     Browser caching of resource files     ###
##################################################
<FilesMatch "\.(js|css)$">
  <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault "access plus 7 days"
  </IfModule>
  FileETag MTime Size
</FilesMatch>

########################################
###     Settings for mod_rewrite     ###
########################################
<IfModule mod_rewrite.c>
RewriteEngine On

### Change this path, if your TYPO3 installation is located in a subdirectory of the website root.
#RewriteBase /

### 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 ^fileadmin/(.*/)?_recycler_/ - [F]
RewriteRule ^fileadmin/templates/.*(\.txt|\.ts)$ - [F]
RewriteRule ^typo3conf/ext/[^/]+/Resources/Private/ - [F]

#RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# RewriteRule .* index.php [L]

############################################################################
###     Redirect all users directly to the https version of the page     ###
############################################################################

RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]

</IfModule>

#############################
###     Miscellaneous     ###
#############################
Options -Indexes

########################################################
###     Disable *.ts files viewing from Frontend     ###
########################################################
<FilesMatch "\.(ts)$">
 order deny,allow
 deny from all
</FilesMatch>

请注意,错误在这里# RewriteRule .* index.php [L]

于 2012-09-05T07:40:34.047 回答