Simple but evading me

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 16 Nov 2016, 14:42

Simple but evading me

16 Nov 2016, 14:44

Hello. Our webmaster isn't available right now and a site has to be redirected. I know nothing about this, but I tried this from looking at rules on another site:

RewriteRule On
RewriteRule * http\://www.newwebsite.org [R=302,L,NC]

It complains about the *, said unknown expression. What criteria do I put to make it match any request? Thank you, sorry to be such a noob, lol.

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Simple but evading me

22 Nov 2016, 12:24

Hello.

Sorry for the late response.
The "redirect all" rule can look like this:

RewriteRule On
RewriteRule .* http\://www.newwebsite.org [R=302]

And you can use the following syntax instead if you want to preserve the file and path that was originally requested and redirect to the same location on a target site:

RewriteRule On
RewriteRule (.*) http\://www.newwebsite.org$1 [R=302]

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 16 guests