You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nick Cooper <ni...@jdi-solutions.co.uk> on 2009/03/31 12:29:45 UTC
[users@httpd] Apache SSL and Rewrite Rules
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?
Is there anyway to still use Rewrite with SSL?
Thank you,
Nick
Re: [users@httpd] Apache SSL and Rewrite Rules
Posted by Nick Cooper <ni...@jdi-solutions.co.uk>.
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 <co...@gmail.com>
> On Tue, Mar 31, 2009 at 6:29 AM, Nick Cooper
> <ni...@jdi-solutions.co.uk> 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@gmail.com
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Apache SSL and Rewrite Rules
Posted by Eric Covener <co...@gmail.com>.
On Tue, Mar 31, 2009 at 6:29 AM, Nick Cooper
<ni...@jdi-solutions.co.uk> 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@gmail.com
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache SSL and Rewrite Rules
Posted by Nick Cooper <ni...@jdi-solutions.co.uk>.
I've never been sure on where you place the log line
RewriteLog "d:/logs/rewrite.log"
Is it in the vhost? no content is being written to the file.
On Tue, Mar 31, 2009 at 12:18 PM, Krist van Besien <
krist.vanbesien@gmail.com> wrote:
> On Tue, Mar 31, 2009 at 12:29 PM, Nick Cooper
> <ni...@jdi-solutions.co.uk> 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?
> > Is there anyway to still use Rewrite with SSL?
>
> RweriteRuels work without any problem. However, it is possible that
> your SSL virtual host doesn't "see" the part of the config where your
> rewriterules are. Enable a rewritelog to see if any rewriterule
> processing takes place.
>
> Krist
>
>
>
> --
> krist.vanbesien@gmail.com
> krist@vanbesien.org
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Apache SSL and Rewrite Rules
Posted by Krist van Besien <kr...@gmail.com>.
On Tue, Mar 31, 2009 at 12:29 PM, Nick Cooper
<ni...@jdi-solutions.co.uk> 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?
> Is there anyway to still use Rewrite with SSL?
RweriteRuels work without any problem. However, it is possible that
your SSL virtual host doesn't "see" the part of the config where your
rewriterules are. Enable a rewritelog to see if any rewriterule
processing takes place.
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org