[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Tricky alias redirection



Hello Roy,

> Currently we have two sites set up on the server. short.com and long.com.
> short.com currently contains a meta refresh that points back to
> long.com/index2.html. We want to reduce that down to a single virtual
> domain, adding short.com as an alias within the site setup. We cant rely
on
> the end users to type out http://short.com/index2.html, as we need to make
> this relatively idiot proof.
>
> Is there an easy way within the virtual hosts section of httpd.conf to do
> that redirection, or are we stuck with two separate virtual domains?

I would suspect that mod_rewrite is your friend here. You could have both
domains served by the same site (by having both domains in the UI Site
Settings > Web Server Aliases field. Then create a .htaccess in the /web
directory that redirects based on the domain the user chose to access the
site with:

http://httpd.apache.org/docs/misc/rewriteguide.html

--
Regards,
Jonathan Michaelson
Commercial CGI Scripting, Web Hosting
Web-based Email, Homepage Creation and Live Help products
http://www.webumake.com