301 redirect on individual dynamic urls?

ISAPI_Rewrite is a powerful URL manipulation engine based on regular expressions
User avatar
Posts: 2
Joined: 11 Dec 2012, 10:45

301 redirect on individual dynamic urls?

11 Dec 2012, 10:55

Hi, is it possible to do simple (explicite) url redirects on individual urls? My dynamic website has a page "http://www.site.com/Big/222/333/". The "Big" is a category name which I need to change to "Large", so that would change the page's url to "http://www.site.com/Large/222/333/". Can I write a rule that simply says if you navigate to /Big/222/333/, 301 redirect to /Large/222/333/ ?

My environment, if it matters, is IIS6.

thanks,
Griffin

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: 301 redirect on individual dynamic urls?

12 Dec 2012, 04:56

Hello, Griffin

Sure, it's possible. Here's the config:

[ISAPI_Rewrite]
RewriteRule /Big/222/333/ http://www.site.com/Large/222/333/ [I,RP]

User avatar
Posts: 2
Joined: 11 Dec 2012, 10:45

Re: 301 redirect on individual dynamic urls?

12 Dec 2012, 15:24

Ok, that's what I was doing, and it wasn't working. I do think I figured this out tho. It turns out, the programmer that set up the initial config used directive [I,L] on every one of the rules they created. If I read/interpret the definition of the L directive, it translates to only the first rewrite rule in my config being active. Is that right? So, understanding that, I placed my 301 redirect rule above that first [I,L] rule, and it works like a charm now!

User avatar
Posts: 27
Joined: 04 Dec 2012, 21:06

Re: 301 redirect on individual dynamic urls?

18 Dec 2012, 22:05

Great work, webrivergrif. Thats how it works for me.

Return to ISAPI_Rewrite 2.x

Who is online

Users browsing this forum: No registered users and 6 guests