1

Hi i use go location on my site and notice the warning message:

getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

with jushost you get a free shared ssl certificate: https://my.justhost.com/cgi/help/126

so i set this up my link is something like https://justxxx.justhost.com/~justxxx/office/index.php. this is a parked domain. the question when the user enters http//office.xxxx/index.php i would like show https//office.xxxx/index.php in the address put redirect to https://justxxx.justhost.com/~justxxx/office/index.php. Not sure how to go about this. I think it can be done in the .htaccess file but i am a little lost. Any help would be great Thanks Jon

jonathan young
  • 237
  • 2
  • 11

1 Answers1

-1

This should work for you. Read the comments in it. I can't totally understand what you are trying to do but if you are trying to redirect http to https this will work.

RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Edit1: If you just want to redirect that specific url. See this question: .htaccess https redirect for a single page (using relative urls)

Community
  • 1
  • 1
Shivam Paw
  • 203
  • 3
  • 14
  • thanks for your quick answer the issue is i do not want to purchase ssl certificate just for one page the as getCurrentPosition() so i used the free ssl certificate which the link is https://justxxx.justhost.com/~justxxx/office/index.php. to get to the page but the user will enter http//office.xxx.co.uk and i need this to redirect to https://justxxx.justhost.com/~justxxx/office/index.php but show https//office.xxx.co.uk/index.php in the address bar ? – jonathan young Aug 23 '15 at 16:18
  • If all you are trying to do is make a redirect you can use a client seed redirect in PHP for example: http://www.somacon.com/p536.php This might help? – Shivam Paw Aug 23 '15 at 16:21