Edgewall Software
Modify

Opened 18 years ago

Last modified 9 years ago

#3249 new enhancement

Default env with parent_dir

Reported by: coderanger@… 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)

default_env.patch (3.8 KB ) - added by coderanger@… 18 years ago.

Download all attachments as: .zip

Change History (9)

by coderanger@…, 18 years ago

Attachment: default_env.patch added

comment:1 by Jonas Borgström, 18 years ago

Priority: highlow

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.

comment:2 by coderanger@…, 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 Matthew Good, 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 coderanger@…, 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 anonymous, 18 years ago

Cc: coderanger@… added

comment:6 by Christian Boos, 18 years ago

Milestone: 0.100.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 osimons, 16 years ago

Milestone: 0.11.30.13

Nor is it likely to be 0.11-stable at this point. Moving it.

comment:8 by Ryan J Ollos, 9 years ago

Owner: Jonas Borgström removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.