Forum Moderators: phranque
Order deny,allow
allow from 127.0.0.1
deny from all# Enable mod_rewrite, start rewrite engine
RewriteEngine on
#
# Redirect "foo.html" to google.com
RewriteRule ^foo\.html$ http://www.google.com/ [R=301,L]
and have a foo.html file as "test ok"
When i write [localhost...] it just prints "test ok" AND NOT REDIRECT TO google.com . Now what to do to run the mod rewrite on localhost?
I assume that you created a file called /foo.html which displays the "Test OK" message unless the request is redirected succssfully. This was not necessary, and likely affected your results if you did not completely flush your browser cache before testing.
Jim
In apache access log i have a entry as
127.0.0.1 - - [15/Sep/2007:23:22:25 +0530] "GET /foo.html HTTP/1.1" 304 -
Even after i delete the foo.html and write localhost/foo.html i donot get redirected to google.com instead it says 404 Page NOT FOUND. What to do to run modrewrite on localhost