httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Octavian Rasnita" <orasn...@gmail.com>
Subject Re: [users@httpd] redirections
Date Thu, 17 Jan 2008 17:59:00 GMT
Ok, I understand that I could use ServerAlias for having 2 or more addresses 
for the same virtualhost, but I don't understand how I can't do what I want 
without redirecting.

I want the url
/maestro

to be redirected to:
/static/maestro/

no matter which is the current host name.

Could I get somehow the host name in a variable and use it in httpd.conf?

...something like:

Redirect /maestro $HOSTNAME/static/maestro/

where $HOSTNAME would get the current host...

I guess I can do it using mod_perl with

<perl>
# get here the hostname and make the redirection
</perl>

but I haven't used perl code in httpd.conf until now, and I thought maybe 
there is an Apache-only method.

Thanks.

Octavian

----- Original Message ----- 
From: "Tony Stevenson" <tony@pc-tony.com>
To: <users@httpd.apache.org>
Sent: Thursday, January 17, 2008 6:17 PM
Subject: Re: [users@httpd] redirections


> On Thu, January 17, 2008 4:01 pm, Octavian Rasnita wrote:
>
>>
>> The problem is that redirection doesn't work because it should redirect
>> to a full address.
>>
>> Does anyone know if there is another solution than creating 2 separate
>> virtual hosts and make 2 separate redirections?
>
>
> If both domain names are for exactly the same site (structure etc) then
> you could just use "ServerAlias"
>
> NO need for a redirect, and no need for the 2nd vhost.
>
>
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message