httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Thyssen" <>
Subject Re: [users@httpd] Mod Rewrite assistance sought (hoped for :-)
Date Tue, 17 Jul 2007 19:51:38 GMT
On 7/17/07, Robert Granvin <> wrote:
> Unfortunately, no (on the content root).  Basically, the "secure" (https)
> portion is a shared subdomain, hence the directory approach.
> Think of the structure this way:
> /var/www/site1
> /var/www/site2
> /var/www/siten
>  ....
> /var/www/secure/
>  \\                       Metro State
> University ->site1
> /var/www/secure/ ->site2
> /var/www/secure/ ->siten
> ...
> Where the "secure" subdomain has symbolic links to the content root
> of each web site (site1, site2... siten).
> Therefore, each web site has access to a single secure server (low cost),
> but has the problem of URLs no longer being valid.

I think I see what you mean now. I do this
in many places, only not in combination with an SSL host.
You just need to make sure Apache listens to the SSL
(and does not modify it) next to the other host name,
and disregards what comes after the name, so it keeps
the sub-folders in place.

Try and use something like this for the document-roots of each site
(so not in the secure doc-root, but the ones deeper),
for example in .htaccess:

RewriteCond %{HTTP_HOST}  !^$
RewriteCond %{HTTP_HOST}  !^$
RewriteRule ^(.*)$1 [L,R]

This should make sure both
and will remain in the location bar
for that particular folder, and don't change,
not even if the folder is 1 below the doc-root
of, like

The only part I'm not sure about is how to make sure
it works with httpS on that 'secondary' name.
You should perhaps also have

RewriteCond %{HTTP_HOST}  !^$

in the secure doc-root folder itself

I'm pretty sure it can be done.

Good luck. ;-)

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message