私は2つのウェブサイト、1つは通常(デスクトップ用)、もう1つはモバイルデバイス用に設計されています。これらは両方とも同じ内容を持っていますが、モバイルサイトはこちら電話(iPhoneやブラックベリーなど)Joomlaのサイトでモバイルリダイレクトが機能しない
のために設計されて、私が探していますものです:
、ユーザは、モバイルデバイス上で自分のサイトに到着するとなりますモバイル版が自動的にリダイレクトされます。モバイル版では、「フルHTMLの表示」というリンクがあり、そのリンクをクリックすると、使用しているデバイス(デスクトップ、iPhoneなど)に関係なく、フルバージョンに送信されます。
Litespeed Webサーバーを使用しています。
私はこれをHTACCESS経由で動作させることはできません。私はhttp://www.mysite.com/?mobile=1を試してみて、私はモバイルサイトに送信され
Options -Indexes
RewriteEngine On
RewriteBase/
#Added the rule below so that redirecting to the index.php does not operate on the mobile site
RewriteCond %{HTTP_HOST} !^m\.
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
# Check if mobile=1 is set and set cookie 'mobile' equal to 1
RewriteCond %{QUERY_STRING} (^|&)mobile=1(&|$)
RewriteRule^- [CO=mobile:1:%{HTTP_HOST},S]
# Check if mobile=0 is set and set cookie 'mobile' equal to 0
RewriteCond %{QUERY_STRING} (^|&)mobile=0(&|$)
RewriteRule^- [CO=mobile:0:%{HTTP_HOST},S]
# cookie can't be set and read in the same request so check
RewriteCond %{QUERY_STRING} (^|&)mobile=0(&|$)
RewriteRule^- [S=1]
# Check if this looks like a mobile device
RewriteCond %{HTTP:x-wap-profile} !^$ [OR]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos" [NC,OR]
RewriteCond %{HTTP:Profile} !^$
# Check if we're not already on the mobile site
RewriteCond %{HTTP_HOST} !^m\.
RewriteCond %{QUERY_STRING} !(^|&)mobile=0(&|$)
# Check to make sure we haven't set the cookie before
RewriteCond %{HTTP_COOKIE} !\mobile=0(;|$)
# Now redirect to the mobile site
RewriteRule^http://m.mysite.com [R,L]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ 404.html [F,L]
#
:ここに同じように私.htacessが見えるものです。
これはJoomla 1.0ベースのウェブサイトで、SEOコンポーネントがインストールされています(sh404sef)。問題が発生しているかどうかはわかりません。 sh404sefは、URLをseo friendly URLに変換します。
いくつかお手伝いできますか?