You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Markus Mayer <my...@gmx.at> on 2005/07/08 13:19:43 UTC

[users@httpd] Rewrites in .htaccess work with http but not https?

Hallo Everybody! :-)

I have a really strange problem for which I can't find a solution.

I have a .htaccess file with a simple rewrite rule in it which right now just 
rewrites from one non existent file to an existing file (see below).  These 
rules work fine when I call up the pages through a http call, but when I do 
it using https, I get an "Internal Server Error".  The error log for the 
https contains entries with "RewriteEngine not allowed here".  If I remove 
the RewriteEngine On line, then I get "RewriteRule not allowed here".  In the 
apache server config, I have an entry for the directory with "AllowOverride 
All" in both http and https.  I'm rellay at a loss as to what's happening.  
Does anyone have any ideas?

regards
Markus

in httpd.conf:
<VirtualHost xxx.xxx.xxx.xxx:80>
	DocumentRoot /usr/local/htdocs
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
        <Directory "/usr/local/htdocs/rewritetest">
                AllowOverride All
        </Directory>
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:443>
	DocumentRoot /usr/local/htdocs
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
        <Directory "/usr/local/htdocs/rewritetest">
                AllowOverride All
        </Directory>
* SSL certificate stuff left out *
</VirtualHost>


Error log entry
/usr/local/htdocs/rewritetest/.htaccess: RewriteEngine not allowed here
/usr/local/htdocs/rewritetest/.htaccess: RewriteRule not allowed here


.htaccess file:
RewriteEngine On
RewriteRule ^test-me.php$ /usr/local/htdocs/rewritetest/testme.php [L,R]


testme.php:
<?php
	echo "Hello";
?>

---------------------------------------------------------------------
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] Rewrites in .htaccess work with http but not https?

Posted by Markus Mayer <my...@gmx.at>.
Hi,

Thanks for the answer.  I looked through and there is no AllowOverride 
directive that would override the all for that directory.  

Any other ideas anybody?

Markus

On Monday 11 July 2005 02:11, Joshua Slive wrote:
> On 7/8/05, Markus Mayer <my...@gmx.at> wrote:
> > Hallo Everybody! :-)
> >
> > I have a really strange problem for which I can't find a solution.
> >
> > I have a .htaccess file with a simple rewrite rule in it which right now
> > just rewrites from one non existent file to an existing file (see below).
> >  These rules work fine when I call up the pages through a http call, but
> > when I do it using https, I get an "Internal Server Error".  The error
> > log for the https contains entries with "RewriteEngine not allowed here".
> >  If I remove the RewriteEngine On line, then I get "RewriteRule not
> > allowed here".  In the apache server config, I have an entry for the
> > directory with "AllowOverride All" in both http and https.  I'm rellay at
> > a loss as to what's happening. Does anyone have any ideas?
>
> Check for every instance of the AllowOverride directive in all your
> apache config files and make sure that you don't have one overriding
> your "all".
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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] Rewrites in .htaccess work with http but not https?

Posted by Joshua Slive <js...@gmail.com>.
On 7/8/05, Markus Mayer <my...@gmx.at> wrote:
> Hallo Everybody! :-)
> 
> I have a really strange problem for which I can't find a solution.
> 
> I have a .htaccess file with a simple rewrite rule in it which right now just
> rewrites from one non existent file to an existing file (see below).  These
> rules work fine when I call up the pages through a http call, but when I do
> it using https, I get an "Internal Server Error".  The error log for the
> https contains entries with "RewriteEngine not allowed here".  If I remove
> the RewriteEngine On line, then I get "RewriteRule not allowed here".  In the
> apache server config, I have an entry for the directory with "AllowOverride
> All" in both http and https.  I'm rellay at a loss as to what's happening.
> Does anyone have any ideas?

Check for every instance of the AllowOverride directive in all your
apache config files and make sure that you don't have one overriding
your "all".

Joshua.

---------------------------------------------------------------------
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