[HCoop-Help] Domtool redirect: with www to without www keeping file path
Adam Chlipala
adamc at hcoop.net
Thu Apr 9 11:39:37 EDT 2009
Michal wrote:
> I'm trying to permanently redirect all
> http://www.mydomain.com/something/ urls to
> http://mydomain.com/something/ (so the file path is kept)
>
> I've tried the following in my domtool file for my domain:
>
> web "www" with
> rewriteRule "^(.*)$" "http://mydomain.com$1" [redirectWith permanent]
> end;
>
> (I found a similar rule at
> http://wiki.hcoop.net/DomTool/Examples/Full#spinlocksolutions.com, but
> with 'secure' instead of 'www') However doing this results in
> http://mydomain.com/ showing the hcoop.net home page (so I have now
> removed the above code from the domtool file)
>
> Any suggestions?
>
You must not have created a virtual host for mydomain.com. You can use
the [vhostDefault] directive to do that. It's like [vhost], but with no
argument before the [with].
More information about the HCoop-Help
mailing list