Setting a redirect with spaces

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 5
Joined: 21 Aug 2012, 13:21

Setting a redirect with spaces

17 Oct 2012, 12:23

Hello,

I am trying to redirect users from an old site to a new site. However, the URL has spaces. In ISAPI Rewrite, I get a syntax error. I tried putting %20 inbetween the spaces but the redirects will now work. This is the rule that I am trying to configure:

RewriteRule ^/sites/This is the old site with spaces http://www.newsite.com

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Setting a redirect with spaces

17 Oct 2012, 17:19

There're several ways to do that, most of them have hints here.

You may use "\s" inside the pattern or use %20 and combine it with NE or NU flag.

regards
Andrew

User avatar
Posts: 8
Joined: 23 Oct 2012, 23:06

Re: Setting a redirect with spaces

24 Oct 2012, 22:41

I found a lot of information from this hints you provided. Thanks.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 4 guests