httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Problem with Mod_Rewrite
Date Tue, 14 Apr 2009 15:27:53 GMT
On Tue, 2009-04-14 at 07:49 -0700, ricardo13 wrote:
> Hi all,
> 
> I'm doing some tests with module rewrite (mod_rewrite), but I'm have
> problems.
> I typed the follow in http.conf:
> 
> <IfModule rewrite_module>
>   RewriteEngine	on
>   RewriteRule ^index.html$ new.html
> </IfModule>
> 
> When I type in browser localhost/index.html don't happen nothing. I have
> file index.html and new.html !!!
> What's happen ???  <IfModule rewrite_module> is wrong ???
> 
> Ricardo
> 
> 

In the httpd.conf, the file path to rewrite includes the '/', so your
RewriteRule does not match.

Try:
  RewriteRule ^/index.html$ /new.html

If that doesn't work, add:
  RewriteLog /path/to/somewhere/we/can/log/rewrite.log
  RewriteLogLevel 5

This should tell you whether a rule does or does not match, and exactly
why.

Cheers

Tom
  


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message