1

Possible Duplicate:
.htaccess file?
Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?

I am looking for exact code for creating .htaccess file used for redirect a simple static page.

Looking forward to positive replies.

Thank You

1 Answers1

4

It doesn't get much simpler than this:

RewriteEngine On
RewriteRule ^foo.html$ /bar.html [R=301]

The effect of this would be users who try to access foo.html getting redirected to bar.html (with the HTTP response code 301).