= Prettier URLs for Trac = If you would like the url to be like: http:/// or (maybe with a subdomain): http://./ there are several ways to do this on Apache: === Using mod_rewrite through httpd.conf === If you have access to your Apache config, load the module mod_rewrite, then, place this in the config: (if you have subdomain, inside a !VirtualHost) {{{ RewriteEngine On SetEnv TRAC_ENV "/path/to/trac/env" ServerName 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 }}} === Using mod_rewrite from .htaccess files === Make an .htaccess file or add the following lines into existing if it's already present in your site directory with trac.fcgi {{{ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /trac.fcgi/$1 [L,QSA] RewriteRule ^$ trac.fcgi [L] }}} Two RewriteCond strings tell Apache do not fire redirection to Trac script if there is existing file or directory with requested name. The last rule works always and redirects root site requests to TracCGI script. If you want to explicitly exclude some paths from being handled by Trac (such as /stats URLs or /phpmyadmin etc. usually provided by hostings) then insert the third RewriteCond right after the second one. {{{ RewriteCond %{REQUEST_URI} !^/(stats/|phpmyadmin) [NC] }}} === Easy access URL as a last resort === The above configurations of Apache will not allow user to see "cgi-bin" or "trac.cgi" string in Trac URLs. However, if you just want to automatically redirect users from your site root to trac page - put a redirect in {{{/usr/share/trac/htdocs/index.html}}}, such as: {{{}}} or put the following in /usr/share/trac/htdocs/index.php if your server supports php to enable a transparent redirect. ---- 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?"]