[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RewriteEngine not working in (my) apache2



Roberto C. Sanchez wrote:
On Thu, Sep 28, 2006 at 04:29:04PM +0300, Kaj Wiik wrote:
Hi!

This (testing) redirection does not seem to be working (in
apache2.conf):

    RewriteEngine on
    RewriteLogLevel 9
    RewriteLog /tmp/rewrite.log
RewriteRule ^/foo(.*) /test/foo.html
(so e.g. if page /foop is requested, /test/foo.html should be returned)

I installed apache2 (sarge), sudo a2enmod rewrite, sudo apache2ctl
graceful, nothing gets printed in rewrite.log (it is created though).

error.log:
[Thu Sep 28 16:19:40 2006] [error] [client xxxxxxxx] File does not
exist: /var/www/foop

Any clues?


Have you tried adding "RewriteBase /" in there?

Regards,

-Roberto
this should do it:
RewriteEngine on
RewriteCond %{REQUEST_URI} !/test/foo\.html  [NC]
RewriteRule foo(.*) /test/foo.html  [R,L]



Reply to: