Rather than providing a text area for aliases, then a check-box to turn these aliases into redirects, why not provide two text areas - one for aliases and one for redirects? We have many situations where we would like both. Not 100% sure how widely applicable our Aegir use-cases are, but I suspect they are fairly mainstream.

Note from the Aegir maintainers:

This issue overlaps with:

Comments

+1 I was asking mig5 about this just the other day, and this is exactly what I had in mind :)

To answer your question ("why not?"): because it was easier that way. :)

I do not object making that change, but do keep in mind the current UI is very easy to use, and adding that feature will make it much more complicated, not sure it's worth the tradeoff unless it's really done right...

I guess having two textareas is simple enough. :)

Strangely, the users I've talked to are confused by the current setup (maybe because they are more technically-minded)... The idea of an "either/or" doesn't make sense to them when aliases and redirects are two different things. Typical case: A user wants a few alias subdomains so multiple http requests can be made for css, js, etc, but redirects from others so that all actual user-viewed pages are on a consistent subdomain (for SEO). Does that make any sense?

The more I look at this form, the more I feel you guys are right and having two boxes just makes sense. I would welcome a patch.

I'm happy to patch the form / variable storage... but w/ my IT chops, I'm not quite sure how to attach the backend. If anyone wants to build off my work on the UI, let me know and I'll work something up!

OK, I'm going to give this a shot. Off to #aegir to ask for mentoring :)

Project:Hosting» Hostmaster (Aegir)

Moving this over to hostmaster. Here's my current working theory on an approach:

I don't think changing the database structure is the best approach, so i'm thinking to remove the checkbox, add a textarea for redirects in its place, the change the alias add/update logic to run the existing INSERT stuff for each $node->aliases and $node->redirects, but hardcode redirection column to 0 for aliases and 1 for redirects.

In theory, this _should_ maintain compatibility with everything else, as long as the provision stuff can handle both redirects and aliases on a single site.

I'd welcome thoughts in the next few hours before I start hacking away at this!

This is exactly what needs to happen.

Worked on this a bit over the weekend, but it might be a while... This is over my head and I'm learning a lot!

One thing that might be a showstopper (and I'm going from memory here, don't have the code in front of me) is that the drush code seems to hand the entire site off with one toggle for redirect or aliased... So there may have to be some patching on the provision side of things as well.

I'm also struggling with how to handle the automated www, non-www, and subdomain stuff in the context of this change. The www/non-www stuff could just be radio buttons (auto www: none, aliased, redirected.... auto non-www: none, aliased, redirected), but not quite sure how to handle the subdomain stuff.

Any input would be much appreciated!

My gut feeling is that the automatic aliases should have the same UI as the site aliases. That is, we would have one hosting-wide setting for "automatic redirects" and another for "automatic aliases".

As for the IPC between hosting and provision, I expected that to change, to be honest, so that's not a big problem. :)

Could this potentially solve the problem I've discussed with myself here?

jgabor: Even as it stands, the redirect feature will solve your problem (as long as you don't also want aliases). If I ever get my hacking to work, you'll have the ability to do both :)

subbing

Version:6.x-0.4-alpha3» 6.x-2.x-dev

@obrienmd - any progress on this feature?

@omega8cc - unfortunately, haven't got back to hacking on this... it's a much-needed feature, I'm sure I'll try again this year if it doesn't show up, once the project load comes down in a few months

Note that this overlaps with #1681904: Ability to configure a url to redirect to in site configuration., but i think this should be done first.

Issue summary:View changes

Updated issue summary.

Maybe you guys are helped with a use-case of mine that is related to this.

Redirect
When I setup a site in Aegir it gets its site name, e.g. example.com. This will be the tld. Then I want my site visitors only go to the www. version of my site. To do this now I need to set my site name to www.example.com and add example.com as a alias.

Subdomain
Next to that, when someone enters through demo.example.com it should be catched too and be redirected to www.example.com.

Alias
For my cdn purpose I want an alias that serves my css/images files etc. This will be available on cdn.example.com. Now we need to be sure that it does not redirect to www.example.com because that defeats the purpose.

I hope this helps in getting closer to the solution.

#18: That's the use case we're all talking about. Basically, one text area for Redirect and another for Subdomain + Alias (which are the same).

@matglas86 note that you can get separate vhost created for fake (local) CDN support with this module: http://drupal.org/project/provision_cdn - so you have at least last item on your list fixed. The first two need separate aliases and redirects feature. I think I will work on this next month (Nov).

Hello, this would be an awesome feature (the one to separate aliases from redirects), there is any progress on this?

Issue summary:View changes

Updated issue summary.

Version:6.x-2.x-dev» 7.x-3.x-dev
Issue summary:View changes

New features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.