![Multiple Multiple](/uploads/1/2/5/6/125614828/345925604.png)
The second argument to url_rewrite_program should point to the director.conf file; a sample is included. Make sure that it is readable by the Squid user, and that the paths refered to in the configuration file are writiable by the Squid user as appropriate. Url_rewrite_program 19. Url_rewrite_children 20. Url_rewrite_concurrency 21. This will cause Squid to listen on multiple ports.
Urlrewriteprogram by squid-cache really redirects the URL. In other words, the end-user gets a response back that says 'redirectted page from foo to bar', and then the user makes another request to the redirected address. I don't want this.
![Url Url](/uploads/1/2/5/6/125614828/943676543.png)
What I want to achieve is similar to apache's modrewrite. I want an abselutely transparent rewriting mechanism. So that the user requests for a spefific content, and he gets it as a response (regardless of his initial requested URL) without any HTTP redirection. The reason I want to avoid redirection via http is because I don't want the end-user to see internal application structures. For example, he requests 'application1.foo.com', and he gets content of a URL that's much lengthier. So if the end-user bookmarks it, he bookmarks my clean little URL (application1.foo.com', this is good to keep users away from such details, it eventually gives them a uniform URL for the service even if I change it in the future.
For example, I might map application1.foo.com to badprovider.com/path/to/file.php initially, and then change it to goodprovider.com/file.php and the user won't notice that. The advantage is, for example, end-user bookmarks would remain correct, as well as regulating their behaviour in a more guided manner. Did you try setting squid as a reverse proxy with the 'accel' mode? It worked for me: acl all src all httpport 3128 accel vhost cachepeer 127.0.0.1 parent 80 0 no-query originserver name=myAccel acl oursites dstdomain yourdomain.net httpaccess allow oursites httpaccess deny all cachepeeraccess myAccel allow oursites cachepeeraccess myAccel deny all negativettl 0 accesslog /var/log/squid/access.log squid hostsfile /etc/hosts coredumpdir /var/spool/squid yourdomain.net is the domain you want to redirect.