httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <uh...@fantomas.sk>
Subject Re: [users@httpd] redirections
Date Mon, 28 Jan 2008 17:46:33 GMT
On 17.01.08 19:59, Octavian Rasnita wrote:
> 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.

Redirect /maestro/  /static/maestro/

in <VirtualHost> section. note the trailing slashes, otherwise you'd
redirect /maestroXYZ to /static/maestroXYZ (unless it's what you want)

> ...something like:
> 
> Redirect /maestro $HOSTNAME/static/maestro/
> 
> where $HOSTNAME would get the current host...

if you want to keep the same hostname, set "UseCanonicalName off" or use two
virtual hosts. However I'd advise not to use multiple hosts for the same
content, unless you really must, and leave apache redirect to the ServerName
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Windows 2000: 640 MB ought to be enough for anybody

---------------------------------------------------------------------
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