easier "redirect-only-domains"

ts77

Well-Known Member
#1
hey there,

I'd like to have an easier way for creating redirect-only vhosts (i.e. a vhost which redirects from domain.com to www.domain.com).

If I didn't miss the easier way I need to:
fully create a new vhost for this (with all the options ;)) and set up a redirect-context which does the actual redirecting and then assign this to a listener.

Some easier way which only needs as input the domain and the redirect-target would be nice.
(something like a wizard?)

tia,

thomas
 

mistwang

LiteSpeed Staff
#2
Right now LSWS treats domain.com and www.domain.com as the same domain name, the leading "www." will be ignored.
If you prefer one over another, you can use a simple URL rewrite url to do the redirect right now, no need to create another virtual host.

We can add a feature that forces to redirect domain.com to www.domain.com or vice versa with easy configuration, but cannot to an arbitrary domain name, does that fits your needs.

What is the easiest way to do that in other web servers, like Apache?
 

ts77

Well-Known Member
#3
mistwang said:
Right now LSWS treats domain.com and www.domain.com as the same domain name, the leading "www." will be ignored.
uhm, what do you mean? there should be really a difference if I use them for different vhosts in the vhost-mappings.

If you prefer one over another, you can use a simple URL rewrite url to do the redirect right now, no need to create another virtual host.
yeah I could. a bit overkill for that but would work.

We can add a feature that forces to redirect domain.com to www.domain.com or vice versa with easy configuration, but cannot to an arbitrary domain name, does that fits your needs.
I guess that would just use a rewrite rule internally?
yeah that would fit my needs but I would prefer a more generic way so that it could be usable for others too :).

What is the easiest way to do that in other web servers, like Apache?
I've used something like that there:
Code:
<VirtualHost 192.168.1.10>
    DocumentRoot /dev/null
    ServerName domain.com
    ServerAlias domain.org domain.biz subdomain1.domain.com
    Redirect permanent / http://www.domain.com/
</VirtualHost>
that works for multiple domains redirecting to some given domain and even arbitrary domains :).

anyway, its just a feature request which could make life easier for simple vhosts like that.
I can live with rewriting for now ... just need to get log-analyzing to work now and then I can switch some more domains over ;).
 

mistwang

LiteSpeed Staff
#4
ts77 said:
uhm, what do you mean? there should be really a difference if I use them for different vhosts in the vhost-mappings.
We will make them dfferent under special cases. For most situation, it is sufficient.


ts77 said:
I guess that would just use a rewrite rule internally?
yeah that would fit my needs but I would prefer a more generic way so that it could be usable for others too :).
It will not be a rewrite rule if implemented as a dedicated feature, rewrite rule is not as efficient.


ts77 said:
I've used something like that there:
Code:
<VirtualHost 192.168.1.10>
    DocumentRoot /dev/null
    ServerName domain.com
    ServerAlias domain.org domain.biz subdomain1.domain.com
    Redirect permanent / http://www.domain.com/
</VirtualHost>
that works for multiple domains redirecting to some given domain and even arbitrary domains :).
Looks like you do need to create a vhost for apache as well.
And similiar configuration can be archived in similar way in LSWS as well, the differences is that you need to add configurations in different places, but not in one configuration file.


just need to get log-analyzing to work now and then I can switch some more domains over ;).
2.0.1 will be released tomorrow or the day after tomorrow to address most known issues.
 
Top