Forum Moderators: Robert Charlton & goodroi
RewriteCond %SERVER_PORT ^443$
RewriteCond Host: ^www\.sitename\.com
RewriteRule (.*) http\://www\.sitename\.com/$1 [RP,L]
My testing in Firefox yields a crazy error (Error: -12263!), and IE just returns an invalid page.
From all of my research, this code is correct. Has anyone ever seen this issue?
I know that we should move them to a subdomain, but that will probably take a little while to take care of (cert modifications, file moving, server changes). In the meantime though this would seem to be the least intrusive correction I can come up with.
I have/had the same issue, I hate to tell others when I do not know for sure if this method has corrected this issue for me. I enacted the following a couple of weeks ago, and IMHO there has not been enough time passed to see if it worked, or if I totally messed up the spidering of my site.
Running on apache:
I created a text file named robots_ssl.txt containing
User-agent: *
Disallow: /
I added the following to my .htaccess to use this file to re-write the robots text file with the blocking instructions only when the request met the condition of having come thru port 443.
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt
I already had in the
Options +FollowSymLinks -MultiViews
RewriteEngine on
for my other re-write conditions & rules
Use this at your own risk! It appears to work great, but I have not had it out there long enough to tell yet, the jury is still out.
Back to Watching
WW_Watcher
Edited to add:
I did not try redirecting the url to a non https for fear of breaking the ssl & I kinda like the thought of users being able to surf my site totally with http, or https, with no problems either way, provided it is working the way I think it is.
[edited by: WW_Watcher at 3:55 pm (utc) on Dec. 23, 2006]
I am not certain that your ruleset is correct even after correcting the escaping issues. It looks like you just rewrite other than port 443 and then only if the host is not the www subdomain.
I have no current means to test a port 443 system.