Re: best pactice - apache, rewrite, ssl, virtualhost or .htaccess



On Mon, Jul 31, 2006 at 02:41:32PM +0200, Ernst-Magne Vindal wrote:
Hi, I'm running Apache2 on Debian Sarge and redirect some sites to https.

I have:
debian 2.6.8-16sarge1
apache2 - 2.0.54-5 with mod_ssl, mod_rewrite

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.

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. But i can redirect to
https if I redirect to https://domain.com/webmail. Is that the only way to do
it? If so is there a way to keep the url in browser at webmail.domain.com even
if redirected domain.com/webmail?
I've googled around some and only found the [R] to put at the end of
RewriteRule. But some say that it will show only the url typed, and some says it
will show the url that user is rediredted to.....anyhow it makes no different.


If you want to have the user's request to go one place but have the URL
show up as something else, then check out ProxyPass and
ProxyPassReverse. You can also redirect by pacing an index.html file
that uses the meta refresh to redirect. Not as elegant, but it works.
Regards,

-Roberto
--
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Re: Pagemill (yes, Pagemill) question
    ... If your server is running Apache and you are ... allowed an .htaccess file, you can create an option in .htaccess to ... '.htaccess redirect' seems useful. ... help if your server uses Apache and you consider going this route. ...
    (comp.sys.mac.apps)
  • Re: Wanted: talented programmers
    ... do things being server side technology, ... For the record, to do this in a .htaccess file, the easiest method is ... ..htaccess file is in the topmost directory, you can redirect the ... Javascript and other client side technologies are fine to add ...
    (comp.sys.acorn.misc)
  • Re: URL Redirection problems
    ... (particularly 301 - Permanet redirect). ... Use HTTP redirects only. ... access to the web server config file and, as this is a rather cheap ... always allow an .htaccess file for all users. ...
    (comp.infosystems.www.servers.unix)
  • Re: Removing obsolete pages from a site
    ... remove the links to them on my web site. ... Redirect permanent /oldpage.php http://example.com/newpage.php ... tidy all up by collecting all the html target files concerned ... redirect any one of them via an .htaccess file in which each url ...
    (alt.html)
  • Re: Moving site to new host + changing domain name; concerned about losing ranking. Help! TIA
    ... using a 301 redirect. ... Set up a separate hosting account for the original site. ... you want to put in it is a .htaccess file with this code: ... Get started with a SEO report of your site: ...
    (alt.internet.search-engines)