RE: URL forwarding
> -----Original Message-----
> From: Sebastiaan [mailto:S.Breedveld@ITS.TUDelft.NL]
> Sent: Thursday, October 17, 2002 8:07 AM
> To: Price, Erik
> Cc: Sebastiaan; debian-user@lists.debian.org
> Subject: RE: URL forwarding
>
> Thanks, but I still can't get it to work. On the server
www.mydomain.com
I have put
RewriteEngine on
RewriteBase http://www.mydomain.com/
RewriteRule ^(.+) http://www.myweb.com/~mypage/$1
in the /var/www/.htaccess directory, which is empty except that one file.
Unfortunately when I browse to http://www.mydomain.com/ it ends up showing
the empty directory /var/www/. Looks like apache does not care about the
.htaccess file, or I configured it wrong.
Thanks,
Sebastiaan
ps: I do not have any special access to www.myweb.com
(sorry my mail client is such a piece of shit)
Does your host provide for the use of .htaccess files, and if so, is mod_rewrite URL-rewriting a feature that is supported? This is something that is specified in the httpd.conf file, usually. Read up on .htaccess files at http://httpd.apache.org/ and then make sure that your host is configured to let you use them. Or just ask the webmaster.
Also, I think that your RewriteBase directive should specify an absolute filesystem path, not a URI. But I can't remember if it's an absolute filesystem path according to the server's filesystem or according to document root. So I would try:
RewriteEngine On
RewriteBase /var/www/
RewriteRule ^(.+) /home/~mypage/ [R]
It might not work, but experiment with those paths -- mod_rewrite is a bitch and I haven't yet mastered it myself.
Erik
Reply to: