Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 重写前重定向_.htaccess_Symphony Cms - Fatal编程技术网

.htaccess 重写前重定向

.htaccess 重写前重定向,.htaccess,symphony-cms,.htaccess,Symphony Cms,有一个问题,我需要重定向旧的URL,但不禁用页面结构的mod_重写 redirect 301 /home.html http://www.url.com/ 它需要存在于Symphony 2.0.htaccess文件中 ### Symphony 2.0.x ### Options +FollowSymlinks -Indexes <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / ### DO

有一个问题,我需要重定向旧的URL,但不禁用页面结构的mod_重写

redirect 301 /home.html http://www.url.com/
它需要存在于Symphony 2.0.htaccess文件中

### 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>
######
交响乐2.0.x### 选项+FollowSymlinks-索引 重新启动发动机 重写基/ ###请求“favicon.ico”时不应用规则 RewriteCond%{REQUEST_FILENAME}favicon.ico[NC] 重写规则。*-[S=14] ###图像规则 重写规则^image\/(.+\(jpg | gif | jpeg | png | bmp))$extensions/jit|u image\u manipulation/lib/image.php?参数=$1[L,NC] ###检查尾部斜杠-将忽略文件 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_URI}/$ 重写cond%{REQUEST_URI}!(.*)/$ 重写规则^(.*)$$1/[L,R=301] ###管理重写 重写规则^symphony\/?$index.php?模式=管理&%{QUERY\u STRING}[NC,L] 重写cond%{REQUEST_FILENAME}-D 重写cond%{REQUEST_FILENAME}-F 重写规则^symphony(\/(.\/?)?$index.php?symphony页面=$1&mode=administration&%{QUERY\u STRING}[NC,L] ###前端重写-将忽略文件和文件夹 重写cond%{REQUEST_FILENAME}-D 重写cond%{REQUEST_FILENAME}-F 重写规则^(.*\/?)$index.php?symphony页面=$1&%{QUERY_STRING}[L] ######
重写规则^home(.*)[R=301,L]
更新以反映@matt_asbury的答案