Adult Script Pro Community Forums

Create, help and share your ideas with the community!

You are not logged in.

#1 2014-10-02 06:46:13

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Desktop <-> Mobile URL Mapping

Hi,

When a user loads the url http://www.domain.com/id/video-slug/ from a mobile device
it should automatically redirect the user to the http://m.domain.com/id/video-slug/ url :-)


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#2 2014-10-02 07:22:10

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: Desktop <-> Mobile URL Mapping

I am using this

<IfModule mod_rewrite.c>
RewriteEngine On
RedirectMatch 404 ^/mobile/.*$
RewriteCond %{HTTP_HOST} !^m.site.com$

# a bunch of smart phone devices
RewriteCond %{HTTP_USER_AGENT} "sony|symbian|nokia|samsung|mobile" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "windows ce|epoc|opera mini|nitro" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "j2me|midp-|cldc-|netfront|ipad|mot" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "up\.browser|up\.link|audiovox" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "netfront|mot|up\.browser|up\.link"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "audiovox|blackberry|ericsson,"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "panasonic|philips|sanyo|sharp|sie-"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|dange"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "palm|series60|palmsource|pocketpc"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "alcatel|ericy|vodafone\/|wap1\."[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "wap2\.|iPhone|android"[NC,OR]

# redirect google mobile bot
RewriteCond %{HTTP_USER_AGENT} "googlebot-mobile"[NC]

# if the request is from any one of the above devices
# redirect to mobile site
RewriteRule .? [url]http://m.site.com[/url]%{REQUEST_URI}  [L,R=302]

Last edited by Eri (2014-10-02 07:22:54)


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#3 2014-10-02 09:20:58

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Desktop <-> Mobile URL Mapping

Yeah...that might work, but not for all URLs. I'm thinking how to make it better.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#4 2015-02-22 22:45:42

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

Re: Desktop <-> Mobile URL Mapping

is good if just the user see the mobile site in the domain like pornhub.com for example

Offline

#5 2015-02-23 06:45:27

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Desktop <-> Mobile URL Mapping

Its good, but google must also know about the mapping.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB