URL Rewrite - ASP

Hi Experts,

I have a site that uses default.asp for each page, the URL + Querystring always looks like -


I'm keen for this to change to -


I've downloaded Helicon Ape which is a fantastic tool, but I just can't get my REGEX to work, here is what I have (that isn't working)

SeoRule /default\.asp\?id=(.+)(?:(?:&|&)([^&=]+)$ /$1/$2 [NC,L] 
RewriteRule ^(\d+)/.+$ /default.asp?id=$1 [NC,L]

Open in new window

Appreciate some assistance with this -

Who is Participating?
aikimarkConnect With a Mentor Commented:
at first glance, I don't see anything to match the p character before the equal sign.
garethtnashAuthor Commented:
You are of course correct, thank you,..

However, now that it this part is working OK, this -


redirects to -


but when I get to that page all links within it still contain the /2/, meaning that a link that should be written as /3/another-page-title, is actually written as /2/3/another-page-title, meaning that clicking on any link on /2/page-title just redirects to itself...

Here is my current code --

RewriteBase / 
SeoRule default.asp\?id=(.+)(?:(?:&|&))p=([^&=]+)$ $1/$2 [NC,L]
RewriteRule ^(\d+)/.+$ /default.asp?id=$1 [NC,L]

Open in new window

garethtnashAuthor Commented:
thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.