0

現在、メイン サイト (www.jguffphotography.com) を htaccess で (mobile.jguffphotography) にリダイレクトしています。それはうまくいきます

(www.jguffphotography.com/photopage/) から (mobile.jguffphotography.com/photopage) に個別にリダイレクトされたディレクトリがあります。

メイン ドメインとフォトページ ディレクトリに htaccess ファイルがあります。

携帯電話からはすべて問題なく動作していますが、PC では写真ページの URL がモバイル サブドメインにリダイレクトされています。


私が持っている主なドメインhtaccessコーディングは


RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^$ http://mobile.jguffphotography.com [L,R=302]

私がフォトページディレクトリに持っているものは


RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RedirectMatch 301 ^/photopage/([^.]+).html$ http://mobile.jguffphotography.com/photopage/$1.html

4

1 に答える 1

1

RedirectCondmod_rewrite の一部であり、次の に適用されますRewriteRuleRedirectMatchmod_alias の一部であり、前の状態とは何の関係もありません。mod_rewrite に固執する必要があります。

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^photopage/([^.]+).html$ http://mobile.jguffphotography.com/photopage/$1.html [R=301,L]
于 2012-07-04T01:00:49.140 に答える