Redirect problems

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 3
Joined: 17 Feb 2013, 07:54

Redirect problems

18 Feb 2013, 04:55

Hi,

I want to redirect an old url to a new one with 301 redirect.

My link looks like this: celebrity/alecia-moore/actor/13/
I want to be redirected to: celebrity/alecia-moore/profile/13/

Can somebody point me to the right direction?

Thank you!

User avatar
Posts: 3
Joined: 17 Feb 2013, 07:54

Re: Redirect problems

18 Feb 2013, 06:29

I wonder how can I redirect values from string (ex. actor, musician...) to value (ex. profile) even if I don't know the url...

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

Re: Redirect problems

18 Feb 2013, 07:15

Hello,

Please try the following rule:

RewriteBase /
RewriteRule ^(celebrity/.+)/(?:actor|musician)/(\d+/)$ /$1/profile/$2 [NC,R=301,L]

User avatar
Posts: 3
Joined: 17 Feb 2013, 07:54

Re: Redirect problems

18 Feb 2013, 09:06

It doesn't work for me... I have tried also with RegexTest and is something wrong.

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

Re: Redirect problems

19 Feb 2013, 05:57

Hello,

What test URL do you use to check the rule?

Please enable logging in httpd.conf by putting

RewriteLogLevel 9

and provide rewrite.log records for that request.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 4 guests