Click to See Complete Forum and Search --> : .htaccess working for non-ssl, but not for ssl


TecBrat
06-02-2011, 12:08 PM
This is for a site that has shared ssl so the normal address would be like http://www.domain.com and the ssl would be https://secure.hostdomain.net/~dom. There is a wordpress installation on this site. Mod re-write is in use for permalinks. Below is the htaccess section that controls the re-write. Can anyone tell me how to duplicate this, but with
https://secure.hostdomain.net/~dom ?


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

TecBrat
06-08-2011, 02:54 PM
Well,

I found that http://www.domain.com/~dom works just like http://www.domain.com, so I tried
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~dom
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~dom/index.php

</IfModule>

The non-ssl version works, but the ssl version still fails.
Another site suggested this: (They were doing something a little different, but the same idea)

RewriteBase /~site
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule !(\.pdf$|\.gif$|\.jpg$|\.png$|\.css$|\.js$|\.mov$|\.wmv$) index.php

RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} /~site
RewriteRule .* /index.php

so I did this:


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~dom
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php

RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} /~site
RewriteRule .* /index.php
</IfModule>

The SSL version still fails. (404 error)
Can someone tell me if I'm headed in the right direction?