| 1 | = Prettier URLs for Trac = |
| 2 | |
| 3 | If you would like the url to be like: |
| 4 | |
| 5 | http://<yourhostname>/ |
| 6 | |
| 7 | or (maybe with a subdomain): |
| 8 | |
| 9 | http://<subdomain>.<yourhostname>/ |
| 10 | |
| 11 | this is one way, using mod_rewrite (in Apache): |
| 12 | |
| 13 | load the module mod_rewrite, then, place this in your apache config: |
| 14 | (if you have subdomain, inside a !VirtualHost) |
| 15 | |
| 16 | {{{ |
| 17 | RewriteEngine On |
| 18 | <Location "/cgi-bin/trac.cgi"> |
| 19 | SetEnv TRAC_ENV "/path/to/trac/env" |
| 20 | </Location> |
| 21 | |
| 22 | ServerName <hostname> |
| 23 | Alias /trac "/usr/share/trac/htdocs" |
| 24 | |
| 25 | ScriptAlias /cgi-bin /path/to/cgi-bin |
| 26 | RewriteRule ^/$ /cgi-bin/trac.cgi [R] |
| 27 | }}} |
| 28 | |
| 29 | |
| 30 | '''Note:''' This is actually not necessary. You can just use ScriptAliasMatch directly. I'll add an example later. -- DanielLundin |
| 31 | |
| 32 | ---- |
| 33 | See also: TracInstall, TracMultipleProjects |