You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andreas Matthias <an...@tuwien.ac.at> on 2007/02/02 11:59:53 UTC
[users@httpd] RewriteRule not executed with https
My RewriteRule is working for http connections but not for https
connections.
In my .htaccess I have the following RewriteRule:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /drupal/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
This is working pretty well when connecting to http://localhost/drupal/
>From the log:
127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (3) [per-dir /var/www/localhost/htdocs/drupal/] strip per-dir prefix: /var/www/localhost/htdocs/drupal/ ->
127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (3) [per-dir /var/www/localhost/htdocs/drupal/] applying pattern '^(.*)$' to uri ''
127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (4) RewriteCond: input='/var/www/localhost/htdocs/drupal/' pattern='!-f' => matched
127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (4) RewriteCond: input='/var/www/localhost/htdocs/drupal/' pattern='!-d' => not-matched
127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (1) [per-dir /var/www/localhost/htdocs/drupal/] pass through /var/www/localhost/htdocs/drupal/
But if I am trying to connect to https://localhost/drupal/ the
RewriteRule doesn't seem to be executed. There is not entry in
the log file. And addresses like https://localhost/drupal/admin
fail with `url not found'.
What's going wrong?
Ciao
Andreas
---------------------------------------------------------------------
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] RewriteRule not executed with https
Posted by Krist van Besien <kr...@gmail.com>.
On 2/2/07, Andreas Matthias <an...@tuwien.ac.at> wrote:
> My RewriteRule is working for http connections but not for https
> connections.
>
> In my .htaccess I have the following RewriteRule:
>
> <IfModule mod_rewrite.c>
> RewriteEngine on
> RewriteBase /drupal/
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
> </IfModule>
>
> This is working pretty well when connecting to http://localhost/drupal/
> From the log:
>
> 127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (3) [per-dir /var/www/localhost/htdocs/drupal/] strip per-dir prefix: /var/www/localhost/htdocs/drupal/ ->
> 127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (3) [per-dir /var/www/localhost/htdocs/drupal/] applying pattern '^(.*)$' to uri ''
> 127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (4) RewriteCond: input='/var/www/localhost/htdocs/drupal/' pattern='!-f' => matched
> 127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (4) RewriteCond: input='/var/www/localhost/htdocs/drupal/' pattern='!-d' => not-matched
> 127.0.0.1 - - [02/Feb/2007:11:46:19 +0100] [localhost/sid#818b240][rid#8236d00/initial] (1) [per-dir /var/www/localhost/htdocs/drupal/] pass through /var/www/localhost/htdocs/drupal/
>
>
> But if I am trying to connect to https://localhost/drupal/ the
> RewriteRule doesn't seem to be executed. There is not entry in
> the log file. And addresses like https://localhost/drupal/admin
> fail with `url not found'.
>
> What's going wrong?
Your SSL virtualhost probably doesn't read the .htaccess file at all.
Maybe you need an "AllowOverride all" somewhere.
You could also add the rewrites to your httpd.conf. That's how I did
it when I installed Drupal.
Krist
--
krist.vanbesien@gmail.com
Bremgarten b. Bern, Switzerland
--
"...what you don't realize is that in the future Google WILL reach
sentience, will [have had] invent[ed] a time machine, and will [have
had] travel[ed] back in time to prevent Bill Gates... only to become
Bill Gates by accident because of a search engine optimization
miscalculation." (Comment on the Dilbert Blog)
---------------------------------------------------------------------
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
[users@httpd] Re: RewriteRule not executed with https
Posted by Andreas Matthias <am...@kabsi.at>.
Olaf Lautenschlaeger wrote:
> On Friday, February 02, 2007 11:59 AM [GMT+1=CET],
> Andreas Matthias <an...@tuwien.ac.at> wrote:
>
>> But if I am trying to connect to https://localhost/drupal/ the
>> RewriteRule doesn't seem to be executed.
>
> You probably need to have 'RewriteEngine On' (and of
> course all the rule set too) for the https virtual host?!
How embarrassing. I totally forgot to configure the ssl
virtual host. Now, after doing that, apache executes the
rewrite rules in .htaccess for https requests as well.
Thanks.
Ciao
Andreas
---------------------------------------------------------------------
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] RewriteRule not executed with https
Posted by Olaf Lautenschlaeger <ap...@anova.de>.
On Friday, February 02, 2007 11:59 AM [GMT+1=CET],
Andreas Matthias <an...@tuwien.ac.at> wrote:
> But if I am trying to connect to https://localhost/drupal/ the
> RewriteRule doesn't seem to be executed.
You probably need to have 'RewriteEngine On' (and of
course all the rule set too) for the https virtual host?!
---------------------------------------------------------------------
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