2012-12-07 42 views

回答

1

啓用mod_rewrite的和通過的.htaccess和httpd.conf然後把這個代碼在你.htaccessDOCUMENT_ROOT目錄:

Options +FollowSymLinks -MultiViews 
# Turn mod_rewrite on 
RewriteEngine On 
RewriteBase/

RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$ [NC] 
RewriteRule ^(.+)$ https://s3.amazonaws.com/whatever/$1 [R=301,L] 
0

假設你有一個專門的文件夾的子域,你只需要以下規則:

RedirectMatch 301 /(.*) https://s3.amazonaws.com/whatever/$1 
+0

右側,有一個專門的subf較舊/完全設置的子域名... –