0
好的,這裏相當多。我最近更改了域名,我需要重定向相當多的東西。首先..在HTACCESS中將某個URL重定向到另一個URL
http://helloarchie.blue(舊域)的所有頁面
需要重定向到
到目前爲止只有通過cPanel設置的主頁重定向。
我還需要所有圖像重定向這個網址:
到
這裏是我的htaccess目前。
Options -indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php?/$1 [L]
# RewriteCond %{HTTP_HOST} ^(www\.)?kaye\.at$
RewriteRule ^(.+\.png|gif|pdf|jpg|doc)$ http://helloarchie.co/$1 [NC,L,R]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
RewriteCond %{HTTP_HOST} ^www\.helloarchie\.co [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^(.*)$ http://helloarchie.co/$1 [L,R=301]
<Files 403.shtml>
order allow,deny
allow from all
</Files>
的RewriteCond%{HTTP_HOST} ^(WWW \)凱\ $ .AT重寫規則 ^(+ \ PNG | GIF | PDF | jpg | doc)$ http://helloarchie.co/$1 [NC,L,R]只重定向png,git,pdf,jpg,doc文件。那是你要的嗎 ?什麼是問題? – wargre
我已經澄清我的查詢更好一點(希望)。 –
RewriteCond%{HTTP_HOST}^www \ .helloarchie \ .co [NC] ==>應該是RewriteCond%{HTTP_HOST}^www \ .helloarchie \ .blue [NC] – wargre