STAINLESS Posted December 31, 2010 CID Share Posted December 31, 2010 I have http running fine and ssl enabled for managers , the script detects by login credentials,and it works fine. My problem is I want when a manger turns on ssl(the URL is now https://site.com), they get redirected to https://www1.site.com. How can I do this please, in .htaccess ? I searched google extensively, before coming here, and cant find a solution.I dont want it to redirect http: to http://www1. just if ssl is enabled. I also tried RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] But it doesnt work. Thank you Quote Link to comment Share on other sites More sharing options...
CA3LE Posted December 31, 2010 CID Share Posted December 31, 2010 I have http running fine and ssl enabled for managers , the script detects by login credentials,and it works fine. My problem is I want when a manger turns on ssl(the URL is now https://site.com), they get redirected to https://www1.site.com. How can I do this please, in .htaccess ? I searched google extensively, before coming here, and cant find a solution.I dont want it to redirect http: to http://www1. just if ssl is enabled. I also tried RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L][/code] But it doesnt work. Thank you I happen to have extensive Mod Rewrite knowledge... but I've never written a rule with a {SERVER_PORT} as a condition. First, try this... [code]RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] With the "!" you're saying, 'if the request is NOT matching SERVER_PORT 443' -- you want 443 to be forwarded to https, right? - CA3LE Quote Link to comment Share on other sites More sharing options...
STAINLESS Posted December 31, 2010 Author CID Share Posted December 31, 2010 Thank you for answering.I actually tried that which you gave, but it still did not work.Or maybe it is working and I am not explaining myself.When accessing https, it shows in the browser https://site.com , I want the browser to be changed to https://www1.site.com, I should see it changed in the browser right? Quote Link to comment Share on other sites More sharing options...
mudmanc4 Posted December 31, 2010 CID Share Posted December 31, 2010 I'm not sure about the port thing either , but Shouldn't this ......... RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] Look like this ..... ? or doesnt that matter RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ https://www1%{SERVER_NAME}%{REQUEST_URI} [L,R] And yes i would say you would have to see "www1" for sure for the redirect to be working. You are using www1 in your redirect yes ? I know dumb question , just the simple things sometimes you know.. And the 301 shouldnt matter since it wont be indexed anyhow Quote Link to comment Share on other sites More sharing options...
STAINLESS Posted January 3, 2011 Author CID Share Posted January 3, 2011 I'm not sure about the port thing either , but Shouldn't this ......... RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] Look like this ..... ? or doesnt that matter RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ https://www1%{SERVER_NAME}%{REQUEST_URI} [L,R] And yes i would say you would have to see "www1" for sure for the redirect to be working. You are using www1 in your redirect yes ? I know dumb question , just the simple things sometimes you know.. And the 301 shouldnt matter since it wont be indexed anyhow THANKS FOR the help but it didn't work either. I might be complicating the issue.I have a UCC ssl certificate,it has my domain name on it along with www1 and www2 .The cert is installed and everything is running ok, except for the issue of when ssl is on,the blue bar up top in my browser doesn't appear and stay.It only appears and stay when I do www1.domain.com or www2.domain.com .thus my trouble when the site is in normal ssl mode I want it to show up like https://www1.domain.com instead of https://domain.com P.S the blue bar doesnt show when I type the site any other way, e.g https://www.domain.com ,https://domain.com Quote Link to comment Share on other sites More sharing options...
mudmanc4 Posted January 3, 2011 CID Share Posted January 3, 2011 What I'm not understanding is how or why you'll carry the SSL from one domain to another, why not just skip the concern for SSL as a prerequisite , and redirect via simple link to the secured server ? No need for anything in .htaccess , yes ? Either way , if they don't have the proper credentials , they cannot log in , right ? Just create a link stating ( whoever ) and point them to the www1.https://secured.domain . There are many things you can do via .htaccess to prevent the running of malicious scripting and of known bad url , those silly brute force attempts ect. Even going further but password protecting a directory. Quote Link to comment Share on other sites More sharing options...
dainiiuss9 Posted January 23, 2011 CID Share Posted January 23, 2011 I need a program that can speed up my internet speed internet speed is only 28.8 - 56 kbps Please help me :rolleyes: :rolleyes: :rolleyes: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.