Do I need to have my code to look for "mydata" then redirect to: [mydata.example.com...]
Since I want to redirect everything to https I should not have to look for anything specific though, correct? Im sure there is some type of code that will redirect everything to [mydata.example.com...] without looking for anything specific in the url.
g1smd
8:21 pm on Jan 28, 2011 (gmt 0)
If you want to look for "mydata", then you'll need a RewriteCond looking at HTTP_HOST.
RewriteRule patterns can only match the path part of a URL request. You need a RewriteCond to look at any other part: host name, port, query string, etc.
When redirecting to HTTPS, you'll need a RewriteCond to test SERVER_PORT and make sure it is NOT 443. You can then redirect those requests to HTTPS. If you don't test SERVER_PORT you'll have an infinite loop.
[edited by: g1smd at 8:58 pm (utc) on Jan 28, 2011]
BrentXDR
8:38 pm on Jan 28, 2011 (gmt 0)
I think I may have a problem with my setup as well.
can you pm me and let me explain?
jdMorgan
10:52 pm on Jan 31, 2011 (gmt 0)
We don't encourage off-line conversations here, as it takes away the usefulness of the thread for future readers... You are of course free to contract-out the work as you see fit, but on your own initiative.
redirects requests for all pages and resources in mydata.example.com or www.mydata.example.com or mydata.www.example.com or www.mydata.www.example.com to the same pages and resources on [secure.example.com...]