Edgewall Software
Home
Trac
Trac Hacks
Genshi
Babel
Bitten
Home
Download
Documentation
Mailing Lists
License
FAQ
Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
Browse Source
View Tickets
New Ticket
Search
Context Navigation
+0
Start Page
Index
History
Editing TracPrettyUrls
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
= Prettier URLs for Trac = If you would like the url to be like: http://<yourhostname>/ or (maybe with a subdomain): http://<subdomain>.<yourhostname>/ this is one way, using mod_rewrite (in Apache): load the module mod_rewrite, then, place this in your apache config: (if you have subdomain, inside a !VirtualHost) {{{ RewriteEngine On <Location "/cgi-bin/trac.cgi"> SetEnv TRAC_ENV "/path/to/trac/env" </Location> ServerName <hostname> Alias /trac "/usr/share/trac/htdocs" ScriptAlias /cgi-bin /path/to/cgi-bin RewriteRule ^/$ /cgi-bin/trac.cgi [R] }}} Or using !ScriptAliasMatch you can redirect all request coming to / without rewriting the URL to the user: {{{ SetEnv TRAC_ENV "/var/to/trac" ScriptAliasMatch ^/(.*) /path/to/trac.cgi/$1 }}} '''Also Note:''' Another simple way to do this is to put a redirect in {{{/usr/share/trac/htdocs}}}, such as: {{{<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://<yourhostname>/cgi-bin/trac.cgi">}}} ---- See also: TracInstall, TracMultipleProjects, [http://projects.edgewall.com/trac/wiki/TracFaq#how-can-i-create-a-nice-url-to-access-trac-cgi TracFaq: "How can I create a nice URL to access trac.cgi?"]
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.