Welcome to WebmasterWorld Guest from 18.208.186.19

Forum Moderators: ocean10000

Message Too Old, No Replies

301 redirect

301 redirect

     
7:11 pm on Sep 8, 2008 (gmt 0)

New User

10+ Year Member

joined:Sept 8, 2008
posts: 3
votes: 0


I am using isapi_rewrite version 2 and the latest build.

I have updated some urls from-

www.site.com/cellular/p/*_*_15

to www.site.com/cellular/p/*_*_8
(the *'s to mean a dynamic value such as mo_clip_ or no_case_)

I have been trying to setup a 301 redirect for the _15 to the _8 so that google will remove the _15 from the search results.

The guys at helicontech have been great but have not been able to provide a working redirect here. My impression is they are giving me more of a rewrite than a redirect.

They have recommended this -
RewriteRule /([^/]+)/p/([^/_]+)_([^/_]+)_15 $1/p/$2_$3_8 [I,RP,L]

It does not do a redirect though as the url in the _15 page does not change to _8.

Any help would be appreciated.
Worst case, we do run the website through an apache proxy and I could try to do this through .htaccess but would prefer to do it at the server versus proxy level.

Thanks

8:18 pm on Sept 8, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


If it's not redirecting, then it's not finding a match as everything else looks OK.

I think you have a couple of things going on, one of which, you're negating characters (slashes), but you're not including anything (\w, .*, \d...)
I think it should be something like:

/(\w+)/p/(\w+)_(\w+)_15 $1/p/$2_$3_8 [I,RP,L]

where \w are letters, use \d for numbers

Chip-

11:16 pm on Sept 8, 2008 (gmt 0)

New User

10+ Year Member

joined:Sept 8, 2008
posts: 3
votes: 0


Thanks for the reply.

They actually just sent me this which works -
RewriteCond Host: (.*)
RewriteRule (/[^/]+/p/[^/_]+_[^/_]+)_9(?:\?.*)? http\://$1$2_3 [I,RP]

The problem is it catches things in other subfolders prior to the /p/

I need to limit it to /subfolder/p/....

2:58 pm on Oct 16, 2008 (gmt 0)

New User from US 

10+ Year Member

joined:May 31, 2004
posts:31
votes: 3


Just curious why are you using an ISAPI filter when you could write a custom httpModule pretty quickly to do 301 redirects for you?
3:55 am on Oct 17, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


ISAPI rewrite can standup to about 280 requests per second, the custom httpModule can handle about 125 on common hardware.

Also, the custom httpModule screws up the postback without some serious hacking.

9:47 pm on Oct 17, 2008 (gmt 0)

New User from US 

10+ Year Member

joined:May 31, 2004
posts:31
votes: 3


I would have to disagree with you on that. 280 requests per second is seriously low. I have dealt with 4000+ a second, which is still minor. I know of sites that have to deal with the 65k simultaneous connection limit network cards have and have no issue.
An httpModule would not mess up your Postback, they should not have anything to do with your postback.
5:11 pm on Oct 18, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


K, go for the custom httpModule and do a postback, then send me a screenshot of your 404 so I can say I told you so :)
7:23 pm on Oct 20, 2008 (gmt 0)

New User from US 

10+ Year Member

joined:May 31, 2004
posts:31
votes: 3


I do it all the time and do postbacks, never had a problem. So you cannot say I tell you so. :>