Ticket #2299 (closed enhancement: fixed)
Ability to override SCRIPT_NAME from base_url
| Reported by: | oetiker@… | Owned by: | mgood |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10.5 |
| Component: | general | Version: | 0.10 |
| Severity: | normal | Keywords: | review fcgi |
| Cc: |
Description
I am using mod_rewrite to hide the fcgi trac script ... this works fine, except that trac uses absolte urls in its generated content ... so the name of the fcgi script will be exposed all the same ... with this patch I can set the TRAC_BASE_URL environment variable to tell trac what base URL it should be using.
--- temp/trac/trac-0.9/trac/web/cgi_frontend.py 2005-10-31 19:37:51.000000000 +0100 +++ pack/trac-0.9/lib/python2.3/site-packages/trac/web/cgi_frontend.py 2005-11-02 23:30:52.393286000 +0100 @@ -49,6 +49,10 @@ self.args = self._getFieldStorage() self.cgi_location = self.__environ.get('SCRIPT_NAME') + + if 'TRAC_BASE_URL' in os.environ: + self.cgi_location = os.environ['TRAC_BASE_URL']; + self.idx_location = self.cgi_location self.path_info = self.__environ.get('PATH_INFO', '')
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


