Hi, I'm completely pulling my hair out with this one..
I've got two websites:
and
idriveacademy.mobi
I'm using the .mobi version for the obvious of making it simple to read on mobile phones.
I've tried using the following code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
# END WordPress
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
# prevent looping
RewriteCond %{HTTP_HOST} !^idriveacademy.mobi$
# if the browser accepts these mime-types, it's definitely mobile, or pretending to be
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]
# a bunch of user agent tests
RewriteCond %{HTTP_USER_AGENT} "****|symbian|*****|*******|mobile|windows ce|epoc|opera" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "blackberry|********,|*********|philips|sanyo|**** *|sie-"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|****|series60|pal msource|pocketpc"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|*******|ericy|vodafone\/|wap1\.|wap2\.|******|android"[NC]
# rewrite rules here
RewriteRule ^(.+)\$ http://www.idriveacademy.mobi/$1 [R=302,NC]
some questions..
1) where do i put the code
2) Have I missed anything ?
3) does it matter if the .index pages are HTML or .PHP for both websites ?
sorry if this sounds like a newbie question but there's very little easy help on this subject
I've got two websites:
and
idriveacademy.mobi
I'm using the .mobi version for the obvious of making it simple to read on mobile phones.
I've tried using the following code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
# END WordPress
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
# prevent looping
RewriteCond %{HTTP_HOST} !^idriveacademy.mobi$
# if the browser accepts these mime-types, it's definitely mobile, or pretending to be
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]
# a bunch of user agent tests
RewriteCond %{HTTP_USER_AGENT} "****|symbian|*****|*******|mobile|windows ce|epoc|opera" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "blackberry|********,|*********|philips|sanyo|**** *|sie-"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|****|series60|pal msource|pocketpc"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|*******|ericy|vodafone\/|wap1\.|wap2\.|******|android"[NC]
# rewrite rules here
RewriteRule ^(.+)\$ http://www.idriveacademy.mobi/$1 [R=302,NC]
some questions..
1) where do i put the code
2) Have I missed anything ?
3) does it matter if the .index pages are HTML or .PHP for both websites ?
sorry if this sounds like a newbie question but there's very little easy help on this subject
Comment