My c5 site is like having 2 diferent sites. How can I fix this?
Permalink
If I open up my web site in my browser, like "MyDomain.com", all internal navagation links include my domain name without the "www." prepended to it. If I request my web site with the "www.", all the navigation links use the full "www.MyDomain.com/".
I seem to have hit an issue that when I use "MyDomin.com/login to log in because I do not have a login link on the web pages, I am redirected to "www.MyDomain.com/login" to log in. This might not seem to be, at first, a problem, but after I log in, I am now on the web site that has the "www." and my page links that I add to html and text blocks are taking me back to the web site without "www." and I am no longer logged in for editing these pages.
Where I am going with this is that I would like all my navagation links to force the use of "www." on their FQDN like when I request the login page. Is there a way to make this happen in c5?
I seem to have hit an issue that when I use "MyDomin.com/login to log in because I do not have a login link on the web pages, I am redirected to "www.MyDomain.com/login" to log in. This might not seem to be, at first, a problem, but after I log in, I am now on the web site that has the "www." and my page links that I add to html and text blocks are taking me back to the web site without "www." and I am no longer logged in for editing these pages.
Where I am going with this is that I would like all my navagation links to force the use of "www." on their FQDN like when I request the login page. Is there a way to make this happen in c5?
Thank you very much for this. I took the two pertinent lines of the example you gave and placed them before the pretty urls' "RewriteBase /" line. It is working fine now. I don't have the .htaccess file in the site's root directory for security purposes. I place the mod-rewrite.c subsection in Apache's website.conf files.
With this rewrite directive now in place, do you know if search engine web crawlers will still see this as two different web sites when they crawl 'website.com' and 'www.website.com' or will they see the "www." rewrite?
Thanks again.
With this rewrite directive now in place, do you know if search engine web crawlers will still see this as two different web sites when they crawl 'website.com' and 'www.website.com' or will they see the "www." rewrite?
Thanks again.
You're welcome. They will see that the non-www should be redirected to the www, and treat it as a single website from now on (may take some time for their indexes to update).
Place it before the '# -- concrete5 urls start --' which is the c5 Pretty URLs feature.