Proxying a subdomain
To proxy an entire subdomain (e.g. trac.yoursite.tld), put something like this into your .htaccess (it should be saved right into your document root, i.e. public_html or web/public depending on the server you're on). Replace XXXX with your tracd port number assigned by TextDrive.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^trac\.
RewriteRule (.*) http://127.0.0.1:XXXX/$1 [P]
Proxying a subdirectory
The following rewrite rules will proxy /trac to your tracd installation and they’d go in a .htaccess file within the root directory of your domain (replace XXXX with your tracd port number assigned by TextDrive).
RewriteEngine On
RewriteRule ^trac_common/(.*) http://127.0.0.1:XXXX/trac_common/$1 [P]
RewriteRule ^trac/?(.*) http://127.0.0.1:XXXX/$1 [P]
RewriteRule ^project1(.*) http://127.0.0.1:XXXX/project1$1 [P]
RewriteRule ^project2(.*) http://127.0.0.1:XXXX/project2$1 [P]
...
RewriteRule ^projectX(.*) http://127.0.0.1:XXXX/projectX$1 [P]
Accessing http://yoursite.tld/trac or http://yoursite.tld/trac/ both present the tracd main menu, and depending on if you had the trailing slash, the project link will take you to http://yoursite.tld/trac/project1 (with) or http://yoursite.tld/project1 (without)
In either case, the links on the project page will reference http://yoursite.tld/project1/wiki, etc so you need to have a RewriteRule for each project you’re serving under your tracd.
(inspired by this post)
