Re: Apache SSL and Rewrite Rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following .htaccess

<Files somepage.php>
AuthName "Admin"
AuthUserFile .htpasswd
Require valid-user
</Files>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /folder
RewriteRule ^$ index.php
RewriteRule ^admin/$ admin/admin.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /handlerequests/default.php [L,QSA,E=CPAGE:$1]

But I think the problem might then me with the whole server setup.

I have various subdomains each with their own vHosts.

Some of these subdomains require SSL, to avoid the cost of additional IPs I setup SSL to use a different Port for every vHost that required it.

e.g. 
https://sub1.domain.com:10001/
https://sub2.domain.com:10002/

If more details are needed let me know.


2009/3/31 Eric Covener <covener@xxxxxxxxx>
On Tue, Mar 31, 2009 at 6:29 AM, Nick Cooper
<nick.cooper@xxxxxxxxxxxxxxxxxxx> wrote:
> I am having some problems with SSL and Rewrite rules, the rewrite rule works
> when not under SSL.
> I understand that an SSL connection occurs before any Rewrite rule has a
> chance to take place, is this correct?

This is correct, the handshakehappens first but the rewrite still happens.

> Is there anyway to still use Rewrite with SSL?

It works the same as non-ssl. Where are your rules defined?

--
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux