Re: best pactice - apache, rewrite, ssl, virtualhost or .htaccess
- From: Jon Dowland <lists@xxxxxxxxxxx>
- Date: Mon, 31 Jul 2006 14:23:34 +0100
At 1154356892 past the epoch, Ernst-Magne Vindal wrote:
I have tryed to redir with .htaccess file and by config
virtualhosts. Both seams to work ok, but will be happy for
some comments for best practice.
.htaccess is more relocatable, as you are keeping the
"logic" about your web app together with the rest of the
code. However it can be slower than defining things in your
httpd.conf files, as apache has to reparse the .htaccess
files with each request. I'd suggest sticking with .htaccess
until a time when you find performance to be a problem.
Another thing is redirection, virtualhosts and url's.
I have not managed to redir http://webmail.domain.com to
https://webmail.domain.com. "webmail" is a virtualhost.
It looks (from below) like you are using rewrite for this.
For such a simple redirect, I'd suggest using
'RedirectMatch' instead. I do this by specifying a
VirtualHost block for port 80 traffic, which does nothing
but redirect to HTTPS:
<VirtualHost *:80>
RedirectMatch permanent ^/(.*)$ https://webmail.domain.com/$1
</VirtualHost>
--
Jon Dowland
http://alcopop.org/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- References:
- best pactice - apache, rewrite, ssl, virtualhost or .htaccess
- From: Ernst-Magne Vindal
- best pactice - apache, rewrite, ssl, virtualhost or .htaccess
- Prev by Date: Contact Me For More Details Investment Proposal
- Next by Date: Re: Help in understanding XDMCP required
- Previous by thread: best pactice - apache, rewrite, ssl, virtualhost or .htaccess
- Next by thread: Re: best pactice - apache, rewrite, ssl, virtualhost or .htaccess
- Index(es):
Relevant Pages
|