2011-01-03 27 views
1

古いURLをリダイレクトする必要があるが、ページ構造のmod_rewriteを無効にする必要はないという問題がありました。それは、シンフォニー2.0の.htaccessファイルに@matt_asburyで答えを反映するために更新書き直す前にリダイレクト

### Symphony 2.0.x ### 
Options +FollowSymlinks -Indexes 

<IfModule mod_rewrite.c> 

    RewriteEngine on 

    RewriteBase/

    ### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico" 
    RewriteCond %{REQUEST_FILENAME} favicon.ico [NC] 
    RewriteRule .* - [S=14] 

    ### IMAGE RULES 
    RewriteRule ^image\/(.+\.(jpg|gif|jpeg|png|bmp))$ extensions/jit_image_manipulation/lib/image.php?param=$1 [L,NC] 

    ### CHECK FOR TRAILING SLASH - Will ignore files 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_URI} !/$ 
    RewriteCond %{REQUEST_URI} !(.*)/$ 
    RewriteRule ^(.*)$ $1/ [L,R=301] 

    ### ADMIN REWRITE 
    RewriteRule ^symphony\/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L] 

    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule ^symphony(\/(.*\/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING} [NC,L] 

    ### FRONTEND REWRITE - Will ignore files and folders 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule ^(.*\/?)$ index.php?symphony-page=$1&%{QUERY_STRING} [L] 

</IfModule> 
###### 
+0

を生きるために必要

redirect 301 /home.html http://www.url.com/ 

答えて

関連する問題