Redirect an ASPX page

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Redirect an ASPX page

11 Jan 2013, 15:41

Hi

This should be really simple but I can't get it to work. I just want to redirect one page to another site, for example:

I want this page

http://mysite.com/someproduct-C6.aspx

To redirect to

http://someotherpage.com/someotherproduct-c45.aspx

Thank You!

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

Re: Redirect an ASPX page

12 Jan 2013, 12:02

Hello,

you need the folliwng in your .htaccess file in the mysite.com folder:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteRule ^someproduct-C6\.aspx$ http://someotherpage.com/someotherproduct-c45.aspx [Nc,R=301,L]


Regards
Andrew

User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Re: Redirect an ASPX page

14 Jan 2013, 14:41

Hi Andrew

Thanks, but this is giving me a 404 file not found.

Any ideas?

THanks

User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Re: Redirect an ASPX page

14 Jan 2013, 14:46

Let me add to that- It doesn't redirect at all. I was getting the 404 when I tried using a page that did not exist to see if it would redirect.

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

Re: Redirect an ASPX page

14 Jan 2013, 23:49

Strange... is there a way ISAPI_Rewrite is not working? Or smth else is processing request first?
Please, provide the rewrite.log for the testing request. Logging issues described in FAQ

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 39 guests