RewriteEngine on RewriteLog /var/log/apache2/rewrite.log RewriteLogLevel 3 RewriteCond %{REQUEST_URI} !^/~.* RewriteCond %{REQUEST_URI} !^/favicon.ico RewriteCond %{REQUEST_URI} !^/error/.* RewriteRule ^/(.+/)?(.*)/?$ http://pessoa.fct.unl.pt/~$1$2 [NE,NC,P] ProxyPassReverse / http://pessoa.fct.unl.pt/