How to rewrite this url?

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 22 Oct 2016, 18:03

How to rewrite this url?

22 Oct 2016, 18:08

Hi, I'm wondering whether rewrite3.0 can do this.

I have a site, somehow the google thinks it has url like this:

http://www.mysite.com/IL/Venice/Industr ... ve./709265

the actual url should be
http://www.mysite.com/IL/Venice/Industr ... Ave/709265

or http://www.mysite.com/property.aspx?id=709265

How to rewrite it?

I tried
#RewriteRule /[a-zA-Z][a-zA-Z]/[a-zA-Z0-9\-/,.`')(&_@%\.]+./([0-9]+) /Property.aspx?ID=$1 [L]

However, it did not work.


thanks

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: How to rewrite this url?

26 Oct 2016, 09:26

Hello.

So what is the pattern here? Can we rely on URL containing dot, followed by slash and numbers? Then please try this rule:

Code: Select all
RewriteRule (.*)\.(/\d+/?) $1$2 [R]

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 12 guests