Neograph734
Verified User
- Joined
- Sep 17, 2014
- Messages
- 18
I've stumbled upon this very old feature request [REQ] Subdomain Redirect and although it works, I don't feel this is the pretty way to solve this issue.
Above issue suggests to create a subdomain (
) using the UI, then add an .htaccess file in the subdomain folder
so it can redirect to something like
using a redirect in .htaccess.
The downside of this method is that it is:
1. Difficult to explain to co-workers, because it is not directly obvious how the construction works.
2. Difficult to maintain, because you need to dig into the files to see what subdomain goes where.
3. Limiting, I cannot use
as a pretty URL because that resolves to a real folder.
Since DirectAdmin can write the Virtual hosts already, I suppose it should be relatively easy to create these kinds of redirects at the VirtualHosts level, with some overview in the UI of all redirects and options to create new ones. This would make these kinds of operations easier to maintain and allow more flexible sub- / pretty-url combinations, so
can redirect to pretty url
.
Above issue suggests to create a subdomain (
Code:
sub.example.com
Code:
example.com/public_html/sub
Code:
www.example.com/some/path
The downside of this method is that it is:
1. Difficult to explain to co-workers, because it is not directly obvious how the construction works.
2. Difficult to maintain, because you need to dig into the files to see what subdomain goes where.
3. Limiting, I cannot use
Code:
example.com/sub
Since DirectAdmin can write the Virtual hosts already, I suppose it should be relatively easy to create these kinds of redirects at the VirtualHosts level, with some overview in the UI of all redirects and options to create new ones. This would make these kinds of operations easier to maintain and allow more flexible sub- / pretty-url combinations, so
Code:
sub.example.com
Code:
example.com/sub