Jump to content

Recommended Posts

Posted

Yes you would (if you don't want a warning coming up on some browsers), but why not just force the use of basedomain.com rather than allowing www.basedomain.com.

Posted

As Rob says, you need to do a redirect. If you do it in the .htacces file and you wanted to redirect everything then it would be;

 

>rewriteEngine on
rewriteCond %{HTTP_HOST} !^tchdomain\.com
rewriterule (.*) https://tchdomain.com/$1 [R=301,L]

 

However, it does depend on what else you are doing, and if you want everything on https, etc. etc.

Posted

I haven't tested, but I think it should be;

 

>RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^ https://tchdomain.ext%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ http://tchdomain.ext%{REQUEST_URI} [R,L]

 

The first will redirect your secure and the second your http.

 

If it doesn't work - shout, and we'll take a closer look.

Posted

You should be able to do a redirect along the lines of the first example I posted above.

 

Just to check my understanding, you want any request coming in, for any file, to use the shared (not your) SSL ?

Posted
Just to check my understanding, you want any request coming in, for any file, to use the shared (not your) SSL ?

 

I'm not entirely decided but yes this may be a possibility.

 

would the code line then be:

 

>RewriteRule ^ https://server###.tchmachines.com/~username%{REQUEST_URI} [R,L]

Posted
I haven't tested, but I think it should be;

 

>RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^ https://tchdomain.ext%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ http://tchdomain.ext%{REQUEST_URI} [R,L]

 

The first will redirect your secure and the second your http.

 

If it doesn't work - shout, and we'll take a closer look.

 

Thanks Andy. I will give this a try when your techs figure out how to install my SSL cert.

 

Bruce

Posted

Andy,

 

I tried your code but I get a "redirect limit exceded" error. This is what I currently have in .htaccess. I commented out the https stuff as part of my testing. Any ideas?

 

Bruce

 

>RewriteEngine On
###RewriteCond %{SERVER_PORT} =443
###RewriteRule ^ https://2wheelhobbies.com%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ http://2wheelhobbies.com%{REQUEST_URI} [R,L]

Posted

Okay. I think I fixed it. The problem is that the not operator (^) can't have a space after it.

 

Corrected .htaccess

>RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^https://tchdomain.ext%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^http://tchdomain.ext%{REQUEST_URI} [R,L]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...