Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't Login Or Create New Account On Bootstrap


broadstreetbully

Recommended Posts

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

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

@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

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

  • 2 weeks later...

@@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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...