Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Switching between http://www and http://
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 3 (Joomla 1.5 compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1
  • 2

TOPIC: Switching between http://www and http://

Re:Switching between http://www and http:// 15 years ago #6122

I added this to my htaccess file as well, it did not redirect to www, but now the default (Home) link links to www and not http if I enter with http only.

But I did notice something else (a continuation of my original problem):
It seems that when one of my admins is logged in at http and I am at www, we "switch accounts" (I am logged in as him and he as me), but none of us are able to use any of the member functions, so we have to sign out and sign back in again. I told him to start using www instead (it seems that there are no problems when we are both on the same domain), so hopefully that will fix it.
The topic has been locked.

Re:Switching between http://www and http:// 15 years ago #6123

Sorry for my double post, but I just noticed that the htaccess rule works just fine. Thank you very much, hopefully this will fix my login issues.
The topic has been locked.

Re:Switching between http://www and http:// 15 years ago #6125

Thanks for your assistance Jan, at least im pointing in the right direction now, j.
Atomicsprite - Social Media Management, SEO & Digital Marketing Agency
The topic has been locked.

Re:Switching between http://www and http:// 15 years ago #6135

It seems my previous trouble was caused by a misconfigured install of Joomla!

Any suggestions for incorporating https:// to www into the rules below?

RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^(.*)$ www.mysite/$1 [R=301,L]

Should this work?


RewriteCond %{HTTPS_HOST} ^mysite.com$ [NC]
RewriteRule ^(.*)$ www.mysite/$1 [R=301,L]

Thanks in advance, DM.
Atomicsprite - Social Media Management, SEO & Digital Marketing Agency
Last Edit: 15 years ago by rocketitsupport. Reason: remove my url
The topic has been locked.

Re:Switching between http://www and http:// 15 years ago #6159

  • jaku
Hello,

no, that will not work.
HTTPS_HOST is not defined variable in Apache.

You can use something like:
 
RewriteCond %{HTTP_HOST} ^www\.yoursite\.om
RewriteCond %{SERVER_PORT} ^443
RewriteRule ^(.*)$ https://ssl.yoursite.com/$1 [r=301,L]
 


or alternatively you can test for HTTPS variable.
 
RewriteCond %{HTTPS} on
 


See Apache 2.0 mod_rewrite documentation for details.
The topic has been locked.

Re:Switching between http://www and http:// 15 years ago #6176

Thanks jan, I tried your suggestion (my settings, plesk control panel, is configured to serve https from same directory as http):

########## Begin - Rewrite rules to enhance SEO SEF
#
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^(.*)$ www.mysite/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} ^www.mysite.com
RewriteCond %{SERVER_PORT} ^443
RewriteRule ^(.*)$ www.mysite.com/$1 [r=301,L]
#
########## End - Rewrite rules to enhance SEO SEF


but I got the following error when entering mydomain.com:

mydomain.com uses an invalid security certificate.
The certificate is only valid for www.mydomain.com.
(Error code: ssl_error_bad_cert_domain)


DM.
Atomicsprite - Social Media Management, SEO & Digital Marketing Agency
The topic has been locked.
  • Page:
  • 1
  • 2
User Login Empty