Stephen,
First of all, thanks for your help.
I knew it was an easy fix. My lack of RexEx knowledge was shooting me in the
foot.
mod_dir is now loading when Apache starts.
I changed my code in the VirtualHost block in httpd-vhosts.conf to look like
this:
</VirtualHost>
[...]
# list of redirects
RedirectMatch ^/$ /home/index.html [R]
</VirtualHost>
And that did it.
One last question, though. This fixed my redirection for just this virtual
host. Do I need to repeat this in each virtual host on the server, or can I
put the redirect code in another location so it will apply to all virtual
hosts on this server?
Thanks,
Darren
-----Original Message-----
From: S.Hayles [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 11:38 AM
To: [email protected]
Subject: Re: [EMAIL PROTECTED] URL Rewriting trouble with Apache 2.2
On Fri, 21 Apr 2006, Darren Hall wrote:
[...]
> The first rewrite adds a trailing slash to the url when requesting any
> directory in the site (or anything that is not a document).
[...]
Given that you want the modified URL to appear in the browser, you need to
perform a redirect. A redirect with added slash for directories is what
mod_dir does (and I'm sure it will be there in a default install).
See http://httpd.apache.org/docs/2.2/mod/mod_dir.html
[...]
> RewriteRule \.org/$ \.org/home/index.jsp [R]
[...]
The string that the rewrite rule matches does not include the hostname, so
you just need to match ^/$
(If you do want to test the hostname, see RewriteCond)
Steven
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]