This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Another 301 Redirect problem
Author
Message |
andrew.kaplan
Newbie


Joined: 16 December 2011
Location: United States
Posts: 3
Posted: 16 December 2011 at 2:39pm

I am trying to do a 301 redirect from an old web page to a new one with in the same site. No matter what I try, nothing works.

from: http://www.somesite.com/jobs/search/?type=jobsearchbanner&source=homepage

to: http://www.somesite.com/jobs/search-results/

I do not want any of the querystrings to come across.

This is what I currently have, but again, it does not work.

RewriteCond %{HTTP:Host} ^somesite\.com$ [NC]
RewriteCond %{QUERY_STRING} ^?type=jobsearchbanner&source=homepage$ [NC]
RewriteRule ^/jobs/search/$ /jobs/search-results/? [NC,R=301,L]

Any help is greatly appreciated
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 19 December 2011 at 5:33am

This rule is completely okay.
Please, try to provide error.log and rewrite.log.
Logging issues described in FAQ

Regards
Andrew
Back to Top
 
andrew.kaplan
Newbie


Joined: 16 December 2011
Location: United States
Posts: 3
Posted: 19 December 2011 at 10:09am

When I try to apply the above conditions and rule, I get a syntax error.

Unknown expression on line #23: RewriteCond %{QUERY_STRING} ^?type=jobsearchbanner&source=homepage$ [NC]

I even tried to dummy down the sytax to just this...

RewriteRule (.*)/jobs/search/ $1/jobs/search-results/? [NC,R=301]

the isapi_errors.log has only one line in it...

[12/19/2011 09:03:50] C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf - Loaded successfully

But the isapi_rewrites.log has multiple line, none if which seem to be applied to the actual page itself. Not sure where you would want to see this log.

Back to Top
 
andrew.kaplan
Newbie


Joined: 16 December 2011
Location: United States
Posts: 3
Posted: 19 December 2011 at 11:36am

Here is my latest.

RewriteCond %{HTTP:Host} ^somesite\.dev$ [NC]

RewriteRule ^jobs/search/$ www\.facebook\.com [NC,R=301]

isapi_errors.log...

[12/19/2011 10:13:14] C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf - Loaded successfully
[12/19/2011 10:13:14] ISAPI Filter loaded. Version 3.1.0.77. Windows 6.1 (Build 7601 ServicePack:1) ProductType SERVER. CPU type AMD64  NumberOfProcessors 2.

First 5 (out of 13) lines from isapi_rewrites.log

127.0.0.1 127.0.0.1  Mon, 19-Dec-2011  10:13:16 GMT [www.somesite.dev/sid#2][rid#18547576/initial] (2) init rewrite engine with requested uri /jobs/Default.aspx?TabId=225
127.0.0.1 127.0.0.1  Mon, 19-Dec-2011  10:13:16 GMT [www.somesite.dev/sid#2][rid#18547576/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1  Mon, 19-Dec-2011  10:13:16 GMT [www.somesite.dev/sid#2][rid#18547576/initial] (3) applying pattern '^jobs/search/$' to uri '/jobs/Default.aspx?TabId=225'
127.0.0.1 127.0.0.1  Mon, 19-Dec-2011  10:13:17 GMT [www.somesite.dev/sid#2][rid#86897688/initial] (2) init rewrite engine with requested uri /DesktopModules/JobSearchEntry/css/somesite.css
127.0.0.1 127.0.0.1  Mon, 19-Dec-2011  10:13:17 GMT [www.somesite.dev/sid#2][rid#86897688/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1  Mon, 19-Dec-2011  10:13:17 GMT [www.somesite.dev/sid#2][rid#86897688/initial] (3) applying pattern '^jobs/search/$' to uri '/DesktopModules/JobSearchEntry/css/biospace.css'

This is a DNN site. When I go to www.somesite.dev/jobs/search/ nothing happens. No redirect happens at all.

 



Edited by andrew.kaplan - 19 December 2011 at 11:37am
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 20 December 2011 at 5:25am

Sorry, haven't noticed '?'.
You need to apply:
Code:
RewriteCond %{QUERY_STRING} ^type=jobsearchbanner&source=homepage$ [NC]

without '?'!

Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version