I have a setup (php application) with
:: varnish (port 80) -> apache port (8080)
By default apache adds trailing slashes to directories but when it does it redirect with the port. e.g.
http:/www.domain.com/folder redirect to http:/www.domain.com:8080/folder/
This url with the port causes issues.
So I tried adding the directive DirectorySlash Off in the .htaccess file but the application doesn't play nice anymore. e.g. broken links etc etc
I then tried to update the VCL as described on http://danielmiessler.com/blog/adding-a-trailing-slash-to-directories-using-varnish/
sub vcl_recv {
if ((req.url ~ "/directory" ) && (! (req.url ~ "index.php"))){
set req.url = req.url "/";
}
}
but I get the error
Message from VCC-compiler:
Expected ';' got '"/"'
(program line 174), at
('input' Line 14 Pos 26)
set req.url = req.url "/";
-------------------------###-
Does anyone have any suggestions?
Thanks