302 Redirect Using Mod_Rewrite

I need to see if I can write a rewrite rule that will forward everthing in a domain as a 302 to another site, all except for the index.htm page.

Is that possible and is there an example of how to do it.

Who is Participating?
caterham_wwwConnect With a Mentor Commented:
> is there an example

RewriteEngine on
RewriteRule !^index\.htm$ http://example.com/ [R,L]

Open in new window

Yes, it's very possible, I can give You the answer, or google it out.
Also visit http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.