httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Newbie: Problem with redirect using rewrite
Date Wed, 15 Sep 2004 19:04:31 GMT
On Wed, 15 Sep 2004 14:11:52 -0400, Jean-Marc lachaine
<jmjmlach@tbaytel.net> wrote:
> I am placing the following directive at the very end of my httpd.conf file
> 
> <Directory /full/path/to/secure/directory>
>     RewriteEngine on
>     RewriteCond ${SERVER_PORT} ^80$
>     RewriteRule ^/secure/(.*)$    https://domain.name.tld/secure/$1 [R]
> </Directory>
> 
> I am running Apache 1.3.31 with modssl. I have restarted Apache using the
> stop and startssl command options of apachectl. The directive however
> appears to be ignored. Suggestions/corrections would be greatly appreciated.

1. Use the RewriteLog to find the problem.

2. You'll probably see that your RewriteRule is not matching because
you are using it inside a <Directory> section where the URL looks
different to mod_rewrite.  Put the mod_rewrite stuff outside the
<Directory> section.

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


Mime
View raw message