This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Need to remove space before a slash
Author
Message |
kwheat99
Newbie


Joined: 27 May 2010
Location: United States
Posts: 11
Posted: 27 January 2012 at 1:45pm

Hello,

We have a search engine that is putting a space in our urls that and getting a 404. They are doing something like this...

http://domain/oh/cincinnati/con-article/654043/cancer /article.htm

Notice the space after the word cancer and before the /. It, however, works if the space is before the word cancer 654030/ cancer/...

The word cancer is the optional (?:\&query=([^&]+)) in the below rule

Here is the rule:
SeoRule articlepage_cn.aspx\?cn-documentid=([^&]+)&s=([^&]+)&cat=([^&]+)(?:\&query=([^&]+))?$ /${mapStates:$2}/${mapCities:$2}/$3-article/$1/(?4$4/)${slug:${SeoHDTitle:$1}}.htm [Redirect, Scope=A]
RewriteRule ^([^-/]+)/([^/]+)/([^/]+)-article/([^-/]+)/(?:([^/]+)/)([^/]+).htm$ /articlepage_cn.aspx\?cn-documentid=$4&s=${revmapSites:$2-$1}&cat=$3&query=$5 [NC,L]

I've tried several things with \s and %20 and LP, NE rules but nothing is working.
Any suggestions?
Thanks
Kelton

Back to Top Visit kwheat99's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 30 January 2012 at 6:22am

Have you tried the following:

Code:
RewriteRule (\S+)(?:\s|%20)(.*) $1$2 [NC,R=301,LP,L]


Regards
Andrew

Edited by AndrushkaUS - 30 January 2012 at 6:24am
Back to Top
 

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

Printable version Printable version