Setting redirects that work on cell phones

vincentg

Well-Known Member
May 12, 2004
154
3
168
new york
Seems that cell phones require more attention when it comes to redirects.

A simple redirect like going from www to no www doesn't work on a cell.
Are there any guide lines for this?

Redirects set with Cpanel work ok on a PC but not on a cell phone.
 

vincentg

Well-Known Member
May 12, 2004
154
3
168
new york
Yes - this one

example.tv

example.net

But we have problems with it

Tried several ways to do it in .htaccess

We will get it to work on a pc but not on a Cell phone.

At current I left it as
Code:
ErrorDocument 404 /404.php
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^example\.tv$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.tv$
RewriteRule ^(.*)$ "https\:\/\/example\.net\/$1" [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^example\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.net$
RewriteRule ^(.*)$ "https\:\/\/example\.net\/$1" [R=301,L]
Had to add
Code:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
when redirect from alias
Cpanel does not put it and if not there you get same ssl error as on phone
 
Last edited by a moderator:

vincentg

Well-Known Member
May 12, 2004
154
3
168
new york
I don't get that on original link on my phone but get it from alais which also does not change displayed url
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,126
667
263
Houston
cPanel Access Level
DataCenter Provider
Based on the rewrite rules you have in your .htaccess it looks like you're forcing SSL but you don't have an SSL certificate. My assumption is you've added an exception for your site in the browser but not on the mobile device which is why you're seeing different things.

I've tried looking at it this morning and I get redirected on both the mobile and browser without an SSL warning.