broadstreetbully Posted April 25, 2015 Share Posted April 25, 2015 so I just made a mobile version of my website and I'm using an htaccess redirect to the mobile site but you can't create a new customer account or login with an existing account. once you fill out all the info for a new account or to log in the page just refreshes. you can create an account by visiting the mobile site on a desktop/laptop and log in but not on the cell phone/tablet. anyone else having this issue? please help! OK so I edited the htaccess file and removed the redirect code and now you can login on all mobile devices... I can't figure this out... here's the htaccess redirect: RewriteBase / RewriteEngine On # Check if mobile=1 is set and set cookie 'mobile' equal to 1 RewriteCond %{QUERY_STRING} (^|&)mobile=1(&|$) RewriteRule ^ - [CO=mobile:1:%{HTTP_HOST}] # Check if mobile=0 is set and set cookie 'mobile' equal to 0 RewriteCond %{QUERY_STRING} (^|&)mobile=0(&|$) RewriteRule ^ - [CO=mobile:0:%{HTTP_HOST}] # 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|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR] RewriteCond %{HTTP:Profile} !^$ # Check if we're not already on the mobile site RewriteCond %{HTTP_HOST} !^m\. # 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.domainname.com%{REQUEST_URI} [R,L] all help is appreciated. Link to comment Share on other sites More sharing options...
clustersolutions Posted April 25, 2015 Share Posted April 25, 2015 By your .htaccess you don't have a typical BS site...your issue has nothing to do with BS. I would pay Burt to get your issue fixed or spend more time on understanding/troubleshooting the .htaccess file... Link to comment Share on other sites More sharing options...
Hotclutch Posted April 25, 2015 Share Posted April 25, 2015 Which version of osCommerce are you using now? Link to comment Share on other sites More sharing options...
broadstreetbully Posted April 25, 2015 Author Share Posted April 25, 2015 @@clustersolutions the above code I posted in just the rewrite snippet, not my entire htaccess file... I'm using OSC 2.3.3.4 BS3 the redirect works fine you just can't login/create account...the page just refreshes when you click "go" after filling in your information Link to comment Share on other sites More sharing options...
broadstreetbully Posted April 25, 2015 Author Share Posted April 25, 2015 I used a smaller redirect and all is well...thank god... here it is for anyone who needs it, just edit the http://www.example.com/mobileand add your domain and put the "m." in front unless your using the "/mobile" directory. RewriteEngine On RewriteCond %{QUERY_STRING} !^desktop RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|#opera mobile|palmos|webos" [NC] RewriteRule ^$ http://www.example.com/mobile [L,R=302] Link to comment Share on other sites More sharing options...
Dan Cole Posted April 26, 2015 Share Posted April 26, 2015 @@broadstreetbully If you're using bootstrap why would you need a mobile version? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
clustersolutions Posted April 26, 2015 Share Posted April 26, 2015 @broadstreetbully...gotcha...by that I meant what Dan Cole was saying... Now, I wonder how would Google index your mobile url as it is now both desktop and mobile...I always try to find ways to break Google's algorithm as that the best way to reverse engineer it...any info would be very much appreciated...Tim Link to comment Share on other sites More sharing options...
ken0306 Posted April 27, 2015 Share Posted April 27, 2015 I did the similar back in 2 years ago by forwarding my mobile traffic to mobile version of my site. I also submit 2 set of sitemaps to google, one for regular site, the other for mobile. What happen was the regular sitemap got submitted, the mobile sitemap not. Because it consider as duplicated contents. However, when people find my link from google search engine and click on it, all mobile device got direct to my index.php page, not the actual product page. I think it needs to find a way to direct your page from http://www.yoursite.com/product_info.php?product_id=123 to http://www.yoursite.com/mobile/product_info.php?product_id=123 not just to the home page. At the end, I change my design to bootstrap responsive..... ken Link to comment Share on other sites More sharing options...
broadstreetbully Posted May 9, 2015 Author Share Posted May 9, 2015 @@broadstreetbully If you're using bootstrap why would you need a mobile version? Dan the regular site wasn't bootstrap @@Dan Cole The only issue I'm having now, which isn't a big one but still, is due to the HTAccess even if the users want to click to go to the main/desktop site the HTAccess will redirect them back to the mobile site. Is there some way to fix this so if they want to STAY on the desktop site they can? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.