Re: URL forwarding
Hi,
On Thu, 17 Oct 2002, Steve Haslam wrote:
> On Thu, Oct 17, 2002 at 12:00:09AM +0200, Sebastiaan wrote:
> > Hey, looks like the stuff I need. Unfortunetely I am unable to configure
> > it correctly. I am stranded at:
> >
> > RewriteEngine on
> > RewriteBase %{REQUEST_URI}
> > RewriteRule ^(.+) http://www.myweb.com/~mypage/$1
> >
> > but after a apachectl configtest, it complains about:
> > RewriteBase: only valid in per-directory config files
> >
> > Any idea how to translate www.mydomain.com to www.myweb.com/~mypage ?
>
> Don't use RewriteBase in httpd.conf. It's only supplied for use in .htaccess
> files which are processed so late in the request that the module can't
> properly determine the correct base for rewritng.
>
> If you have a VirtualHost for www.mydomain.com, just put the
> rewriteengine/rewriterule in there. If you're not using VirtualHosts (argh),
> try:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} =www.mydomain.com
> RewriteRule ^(.+) http://www.myweb.com/~mypage/$1 [R,L]
>
hey, that works too ;-) Thanks!
Greetz,
Sebastiaan
> SRH
> --
> Steve Haslam Reading, UK araqnid@innocent.com
> Debian GNU/Linux Maintainer araqnid@debian.org
> Your heart has been ruptured and it will never heal
> To get another heart you'll have to steal [leæther strip]
>
Reply to: