[OSM-talk] [OT] mod_rewrite

Karl Newman siliconfiend at gmail.com
Wed Dec 12 21:59:57 GMT 2007


On Dec 12, 2007 1:47 PM, Nick Whitelegg <nick at hogweed.org> wrote:
>
> Hello everyone,
>
> Am trying to set up a mod_rewrite rule to map
>
> http://newforest.free-map.org.uk/
>
> to
>
> http://www.free-map.org.uk/newforest/
>
> According to various things I've read this ought to do it :
>
> RewriteCond %{HTTP_HOST} ^http://newforest.free-map.org.uk%$
> RewriteRule ^(.*)$ http://www.free-map.org.uk/newforest/$1
>
> However this does not work - I get the error "can't find host
> newforest.free-map.org.uk". Is there something else I need to configure to
> say that the host newforest.free-map.org.uk is the same as
> www.free-map.org.uk?

I'm not an apache expert (I'm sure the real ones will speak up soon),
but I think there's more to it than just configuring a rewrite rule.
Since it's a different host (newforest instead of www), I think you
have to configure apache with a vhost to answer requests to
newforest.free-map.org.uk. Did you try it without the rewrite rule and
see if the http requests are answered from that url? That would be a
good first step.

Karl




More information about the talk mailing list