--- Topher Fischer <[EMAIL PROTECTED]> wrote: > I'm not using a vhost. I'm just running the page at > http://machine/dir/. Can I make the necessary changes just > within a block like this: > <Directory /dir/> > rewrite rules > </Directory> > > I've played around with different settings, but nothing works > yet. > > As far as I know, vhosts work with different host names, so I > couldn't use a vhost configuration with this setup. Is that > correct?
Technically you probably are using at least one vhost, for the https server. I believe Apache always does it that way. I've got a setup at home where I wanted to do more or less the same thing you're doing here, and I set it up like this: # In the http vhost, or just somewhere in httpd.conf: redirect permanent /mail https://hostname.example.com/mail # In the https vhost (defined in ssl.conf): <Directory /usr/local/www/mail> # appropriate stuff </directory> I've also done it like this: <Directory "/usr/local/mailman/archives"> Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{SERVER_PORT} !443 RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI}?%{QUERY_STRING} [R] </IfModule> </Directory> Both methods seem to work. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
