Opened 18 years ago
Last modified 9 years ago
#3249 new enhancement
Default env with parent_dir
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | next-major-releases |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | coderanger@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Attached is a patch to allow for a default environment to be given when using TRAC_ENV_PARENT_DIR. This means that instead of a simple listing, you can have a full Trac at the base of a domain. The logic is simple, though the code may need to be cleaned up a bit. The patch is against a current checkout (r3369 for the file).
Attachments (1)
Change History (9)
by , 18 years ago
Attachment: | default_env.patch added |
---|
comment:1 by , 18 years ago
Priority: | high → low |
---|
comment:2 by , 18 years ago
There is no way for the webserver to do this, as it doesn't know what paths are valid envs. The reason to not do a redirect is to maintain the idea that there is a normal Trac rooted at the given directory. The whole concept is roughly just being able to give both TRAC_ENV_DIR and TRAC_ENV_PARENT_DIR for the same location.
comment:3 by , 18 years ago
The webserver doesn't need to know about the other environments. If you have Trac installed at "/projects" you could redirect "/projects" to "/projects/default". Accesses to the other project paths would be handled normally.
comment:4 by , 18 years ago
That won't help for "www.example.com/wiki". If / is configued as a parent_dir, then it will try to find an env named "wiki", instead of figuring out what was meant. The major advantage of this is cosmetic as I want to have my website at / instead of /main.
comment:5 by , 18 years ago
Cc: | added |
---|
comment:6 by , 18 years ago
Milestone: | 0.10 → 0.11 |
---|
As there's no consensus on that yet, we should defer the patch to later, 0.11 or 0.10.1 when that milestone gets created.
comment:7 by , 16 years ago
Milestone: | 0.11.3 → 0.13 |
---|
Nor is it likely to be 0.11-stable at this point. Moving it.
comment:8 by , 9 years ago
Owner: | removed |
---|
Instead of modifying the PATH_INFO and SCRIPT_NAME environment variables it's probably better to do a 302 (MOVED TEMPORARILY) redirect. I'm also not totally convinced that this should be handled by Trac at all, it might be better to let the web-server take care of this.
I'm setting the priority to low since this should not block 0.10.