2012-09-05 115 views
0

我正在使用Typo3 4.7.4版本。當我可以在除IE以外的每個瀏覽器中訪問網站的前端(在所有版本中)。將定製的.htaccess文件替換爲Typo3 4.7.4版的默認.htaccess後,它可以正常工作。然後我比較了兩個文件,除了一些更多的配置外,我找不到其他的東西。但是,我不確定這些新配置是否殺死了IE。這裏是我的新的.htaccess配置:.htaccess在IE中找不到404頁面

##################################### 
###  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> 

任何想法,將不勝感激。 謝謝

+1

請檢查你的代碼:「直接重定向所有用戶頁面的HTTPS版本的」沒有重定向。 「RewriteRule。* index.php [L]」被定義兩次。 – maholtz

+0

這是一個觀點。我註釋掉了上面的一行,它可以工作。但是我得到另一個問題。它打破了我的PIE.htc行爲。感謝maholtz求助。 –

+0

請在此更新您的代碼。並且註釋掉「RewriteCond」,你總是會有一些RewriteCond被RewriteRule所覆蓋。如果url到PIE.htc是正確的,請檢查pie.htc和PIE.htc之間的區別。 – maholtz

回答

0

謝謝maholtz求助。

##################################### 
###  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]