0
我有2個版本,一個網站,辦公桌和移動的:的Joomla htaccess的移動重定向
我htacces被重定向移動設備的移動版本。
的問題 ...
1-如果他東陽一直在尋求「東西」和全鏈路it's顯示爲「www.olivashot.com/index訪問者來自谷歌。 PHP /東西「它重定向到」www.mobile.olivashot.com/index.php/thing「 (我有一個快樂的訪問者)
2-但如果谷歌鏈接是:」www.olivashot.com /東西「>>>他被重定向到」www.mobile.olivashot.com「 (我失去了一位訪問者,因爲我沒有顯示他的預期)
我的東西,這是beause I'm重寫「東西」退出在Joomla網站默認的「的index.php」
RewriteBase/
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ http://www.mobile.olivashot.com/$1/ [R=301,L]
工程!謝謝!!! – 2013-04-30 10:01:56