[nzlug] 403 Errors - Virtual Hosts - Apache
Michal Ludvig
michal at logix.cz
Thu Jul 17 17:03:29 NZST 2008
Rob wrote:
> # mysite
> <VirtualHost 0.0.0.0:80>
> ServerName mysite.co.nz
> RewriteEngine on
> RewriteCond %{HTTP_HOST} !^$
> RewriteRule ^/(.*) http://www.mysite.co.nz/$1 [NE,R]
> </VirtualHost>
Looks like you want a simple redirect here, don't you?
How about:
<VirtualHost _default_:80>
ServerName mysite.co.nz
RedirectPermanent / http://www.mysite.co.nz/
</VirtualHost>
> ErrorDocument 403 /var/www/html/mysite404/index.html
ErrorDocument target is a URL, either full or just the absolute local
path. Not filesystem path. I.e. you want:
ErrorDocument 403 /index.html
HTH,
Michal
More information about the NZLUG
mailing list