Changes between Initial Version and Version 2 of Ticket #7500
- Timestamp:
- Oct 23, 2008, 11:51:41 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7500
- Property Status new → closed
- Property Resolution → wontfix
-
Ticket #7500 – Description
initial v2 25 25 1) Modify trac.cgi to work around the bug 26 26 This is easy -- add these lines just after the comments but before the big try-catch block: 27 27 {{{ 28 28 import os 29 29 if 'SCRIPT_URL' not in os.environ and 'REDIRECT_URL' in os.environ: 30 30 os.environ['SCRIPT_URL'] = os.environ['REDIRECT_URL'] 31 31 }}} 32 32 2) The proper fix. 33 33 Edit /lib/python*/site-packages/Trac-0.11-py*.egg/trac/web/main.py. Around line 315 you'll see: 34 {{{ 34 35 script_url = environ.get('SCRIPT_URL') 35 36 if script_url is not None: 36 37 }}} 37 38 Change this to say: 39 {{{ 38 40 script_url = environ.get('SCRIPT_URL') 39 41 if script_url is None: 40 42 script_url = environ.get('REDIRECT_URL') 41 43 if script_url is not None: 42 44 }}} 43 45 Note the two lines I added. 44 46 This makes Trac check for SCRIPT_URL first -- if it isn't assigned, then it checks for REDIRECT_URL. This should make it possible for Trac to find out about the mod_rewrite rule and amend the URLs it outputs accordingly.