Forum for discussing general topics related to Couch.
18 posts Page 1 of 2
Hi

Sorry, I am trying to redirect the site www.recycleyourtec.com to https://www.recycleyourtec.com. I have added in the .htaccess file in the root but it just says the page isnt redirecting properly. Below is my htaccess content, is it something to do with couchcms?

RewriteCond %{HTTP_HOST} !^www\. [OR]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.recycleyourtec.com%{REQUEST_URI} [L,R=301]
Sorry done it by using the following in a htaccess file in the root

Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
hi,

try this

Code: Select all
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]


seems to work for me at least.
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
Hi

I think it's ok by using the following the following, if it does stop working for any reason, I'll try your method

Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


Thank you for the reply etc. appreciate it
I think if you were to use the version of Couch from GitHub (v2,2b as of this post), and explicitly set your site's 'https' URL in couch/config.php, it should automatically handle the redirection - making changes to .htaccess shouldn't be required.
Oh right, I downloaded couchcms from the site not from github

I'll see how it goes as seems to be working at the mo
Oh right, I downloaded couchcms from the site not from github

You'll have to use v2.2b currently only available from GitHub - the release version won't help.
Oh right ok thank you
Have you got the link to download couchcms v2.2 and a link to a guide on how to upgrade couchcms, I think I am using 2.1 currently
You can get it from https://github.com/CouchCMS/CouchCMS (use the green button).

The updating procedure remains exactly the same as with previous versions - https://github.com/CouchCMS/CouchCMS/bl ... UPGRADE.md

As an aside, I failed to mention before that your site needs to be using prettyURLs for the automatic redirection to canonical URLs to be functional. I am sure, though, that you do plan to go that way (if not already there).
18 posts Page 1 of 2
cron