0

I am looking to redirect a url but its giving error, we are using ISAPI on our windows server This is the url i am trying to redirect, but its not redirecting. the problem is multiple dots.

RewriteRule ^keyword1/2\.\.?$ http://www.domain.com/keyword/21212.htm [R=301]

in the above instance it is not escaping the dots

The other url I am having issue is

RewriteRule ^keyword1/2\.\.\./Product/21.htm http://www.domain.com/keyword/21212.htm [R=301]

I have again used escape characters for this one, but it doesn't seem to work. Can you please Help

Howli
  • 12,291
  • 19
  • 47
  • 72
usef4u
  • 1
  • What are the urls you want changed? `keyword1/2..` and `keyword1/2.../Product21.htm`? – Howli Apr 22 '14 at 08:29
  • Hi Howlin.. Basically I want to change /keyword/...abc.../100.htm to /keyword/100.htm and /keyword.../100.htm to /keyword/100.htm – usef4u Apr 22 '14 at 09:02

1 Answers1

0

This should remove the ... from the url:

RewriteEngine On
RewriteRule ^keyword.../(.*)$ /keyword/$1 [L,NC,R=301]
RewriteRule ^keyword/(.*)/(.*)$ /keyword/$2 [L,NC,R=301]

EDIT: Try this

RewriteRule ^bathroom-furniture-shower-taps/2...$ /bathroom-furniture-shower-taps/22456.htm [L,NC,R=301]
Howli
  • 12,291
  • 19
  • 47
  • 72