Käynnissä

Modify .htaccess redirect solution

I have a complete HTACCESS solution to redirect mobile users to a sub-domain and I want my existing solution modified to work redirect to a folder instead.

Rather than [url removed, login to view] - it needs to be http://mydomain/mobile

Here is the existing solution: ( please note I am only paying $10 for the simple change max, if you can't do it for $10, don't bid! )

RewriteEngine on

RewriteBase /

# Check if this is the noredirect query string

RewriteCond %{QUERY_STRING} (^|&)m=0(&|$)

# Set a cookie, and skip the next rule

RewriteRule ^ - [CO=mredir:0:[url removed, login to view]]

# Check if this looks like a mobile device

# (You could add another [OR] to the second one and add in what you

# had to check, but I believe most mobile devices should send at

# least one of these headers)

RewriteCond %{HTTP:x-wap-profile} !^$ [OR]

RewriteCond %{HTTP:Profile} !^$ [OR]

RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "wapp|wapr|webc|winw|winw|xda|xda-" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "[url removed, login to view]|[url removed, login to view]|windowssce|iemobile|mini|mmp" [NC,OR]

RewriteCond %{HTTP_USER_AGENT} "symbian|midp|wap|phone|pocket|mobile|pda|psp" [NC]

RewriteCond %{HTTP_USER_AGENT} !macintosh [NC]

# Check if we're not already on the mobile site

RewriteCond %{HTTP_HOST} !^m\.

# Can not read and write cookie in same request, must duplicate condition

RewriteCond %{QUERY_STRING} !(^|&)m=0(&|$)

# Check to make sure we haven't set the cookie before

RewriteCond %{HTTP_COOKIE} !^.*mredir=0.*$ [NC]

# Now redirect to the mobile site

RewriteRule ^ [url removed, login to view] [R,L]

Taidot: Linux, PHP

Näytä lisää: redirect htaccess wordpress, redirect htaccess dynamic url, mobile redirect htaccess, url rewrite redirect htaccess, redirect htaccess, dynamic redirect htaccess, url redirect htaccess, redirect htaccess linux

About the Employer:
( 115 reviews ) Knoxville, United States

Projektin tunnus: #8650936

Myönnetty käyttäjälle:

khyatiraval

Hi i have read job description and i can start job right now under your assistance please come on chat and lets finish this ASAP.

10 $ USD 0 päivässä
(106 arvostelua)
6.2

5 freelanceria on tarjonnut keskimäärin 19 $ tähän työhön

diastark

A proposal has not yet been provided

23 $ USD 1 päivässä
(67 arvostelua)
5.5
FabxPro

We are IT company located in New Delhi (India) , we deals in server hosting, website development & designing. We are expert in PHP, HTML, ASP, .net, javascript. and all kind of CMS: wordpress, joomla, magento etc. We h Lisää

13 $ USD 1 päivässä
(2 arvostelua)
3.0
florinbacu

A proposal has not yet been provided

30 $ USD 4 päivässä
(7 arvostelua)
3.3
devrightway

hi iam a web developer i have an experience of 7 years in dev and design i have a good knowledge in htaccess work

15 $ USD 1 päivässä
(0 arvostelua)
0.0
anashakim

Aucune proposition n'a encore été fournie.

15 $ USD 3 päivässä
(0 arvostelua)
0.0