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://

Switching between http://www and http:// 15 years, 7 months ago #6098

My default URL keeps on switching between mysite.com and www.mysite.com , and that some times interferes with the cookies (and remember me function). It also seems to be user related (i.e. I always get redirected to http:// when one of my admins is online, but I can keep www when he isn't). I have set base href to don't use, which seems to give most consistent results.

And my joomla administration module always used to redirect me to http earlier, this might have something to do with it? I would prefer to use www. since I have already set that as default for Google, but if I can get something that is consistent, I would be happy with that...
The topic has been locked.

Re:Switching between http://www and http:// 15 years, 7 months ago #6111

  • jaku
Hello,

you should set this at the site configuration level.
Always, just 1 URL - www or without should be used. If user access the other one, he/she should be automatically redirected to the correct one. Using www is preffered way.

You can e.g. set this in Apache configuration or by adding a rule to your .htaccess file.
E.g. you can use something like this:

 
RewriteCond %{HTTP_HOST} ^yoursite.com$
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
 
The topic has been locked.

Re:Switching between http://www and http:// 15 years, 7 months ago #6118

jan wrote:
Hello,

you should set this at the site configuration level.
Always, just 1 URL - www or without should be used. If user access the other one, he/she should be automatically redirected to the correct one. Using www is preffered way.

You can e.g. set this in Apache configuration or by adding a rule to your .htaccess file.
E.g. you can use something like this:

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


Hi Jan, how would you config appache to do this for all websites?

Thanks in advance.
Atomicsprite - Social Media Management, SEO & Digital Marketing Agency
The topic has been locked.

Re:Switching between http://www and http:// 15 years, 7 months ago #6119

In actual face could the option to auto config .htaccess to do this be added into JoomSEF? seems a simple yet crutial step when SEO'ing your site.

j.
Atomicsprite - Social Media Management, SEO & Digital Marketing Agency
The topic has been locked.

Re:Switching between http://www and http:// 15 years, 7 months ago #6120

jan wrote:
Hello,

you should set this at the site configuration level.
Always, just 1 URL - www or without should be used. If user access the other one, he/she should be automatically redirected to the correct one. Using www is preffered way.

You can e.g. set this in Apache configuration or by adding a rule to your .htaccess file.
E.g. you can use something like this:

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


I added this to my .htaccess and restarted apache but I'm not getting redirected?
Any yes I did change 'yoursite' to my own domain. ;)

j.
Atomicsprite - Social Media Management, SEO & Digital Marketing Agency
The topic has been locked.

Re:Switching between http://www and http:// 15 years, 7 months ago #6121

  • jaku
Hello,

There is no need to restart apache.
If usage of htaccess is allowed, the change should be effective immediatelly on .htaccess save.

This rules should work. (taken from our own site) If it does not, then there might be conflict with some other rule or global webserver config or it is not used from some reason.

I am probably not able to help you more on this via email. You could buy some support time and we could check this at your server directly.

Also, you may try to to add [NC] after the RewriteCond, which makes the checking case insensitive. (but I do not think this is the problem in your case)

As regards the default addition of this rule, I do not think that would be good idea, as for many users with speical configurations (not so uncommon) this could cause problems or malfuctions. This is moreless a basic task for the website admin when doing the intial setup to consider whether such rule should be used or not.
Last Edit: 15 years, 7 months ago by .
The topic has been locked.
  • Page:
  • 1
  • 2
User Login Empty