Forum Moderators: phranque

Message Too Old, No Replies

Mod Rewrite Question.

One of my exclusions not working

         

crobb305

1:24 am on Feb 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have created some rewrite rules to do the following:

non-www goes to www
https goes to http except for two subfolders that are SSL

So,

http://example.com goes to http://www.example.com

BUT

[example.com...] is not routing to http://www.example.com
with the https here, I am getting a Security Certification Warning "The security certificate presented by this website was issued for a different website's address"

Should I be specifiying something in the htaccess file to get this working properly?

Here is the code from my htaccess:

RewriteEngine on

AddType application/x-httpd-php .html
AddHandler application/x-httpd-php .php .php3 .phtml .html .htm .php4

# Switch back to HTTP if HTTPS request for anything except /folder-1/ and /folder-2/ subdirectory
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI}!^/folder-1/
RewriteCond %{REQUEST_URI}!^/folder-2/
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^example.(.*)
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

<Files 403.shtml>
order allow,deny
allow from all
</Files>

crobb305

3:56 am on Feb 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just noticed that even [example.com...] is giving me a certificate warning. I have always been able to access cpanel via this url (with https). According to my rewrite rules, https should be routing to http.