Skip to content

Instantly share code, notes, and snippets.

@speedupmate
Created March 9, 2012 09:26
Show Gist options
  • Save speedupmate/2005826 to your computer and use it in GitHub Desktop.
Save speedupmate/2005826 to your computer and use it in GitHub Desktop.
mod_rewrite mobile users to regular checkout
RewriteCond %{HTTP_USER_AGENT} ^.*(iPhone|iPod|BlackBerry|Palm|Googlebot\-Mobile|Mobile|mobile|mobi|Windows\ Mobile|Safari\ Mobile|Android|Opera\ Mini).*$ [NC]
RewriteCond %{REQUEST_URI} ^.*(onestepcheckout)
RewriteRule .* /checkout/onepage/ [R,L]
@livneb
Copy link

livneb commented Jan 21, 2013

nginx configuration -
if ($http_user_agent ~* "^.(iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows\ Mobile|Safari\ Mobile|Android|Opera\ Mini).$"){
rewrite ^/onestepcheckout/ /checkout/onepage/ redirect;
}

@speedupmate
Copy link
Author

cool , thanks for this input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment