Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there
I've just published a new site for a client, where the old site had a lot of urls with parameters indexed.
I wan't to 301 redirect those where possible, but with my current rule i still end up with the id in the new url :/
Example:
www.mysite.com/showItem.php?item_id=123&type=test
I then rewrite like this:
<add name="301redirect17" redirect="Domain" ignoreCase="true" rewriteUrlParameter="ExcludeFromClientQueryString" virtualUrl="http://www.mysite.com/showItem.php?(.*)$" redirectMode="Permanent" destinationUrl="http://www.mysite.com/newpage.aspx" />
This lands me the url of:
www.mysite.com/newpage.aspx?item_id=test
I get the correct page, but clearly i want the parameters excluded. How to go about this? I've searched the forums and google for a while and can't seem to find an example on how to do this with urlrewrite rules as the one above.
Any help is highly appreciated!
Anyone?
Hey Martin,
I'm not entirely sure about this but does it help replacing virtual URL with "http://www.mysite.com/showItem.php" ?
Grtz
L
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Rewrite url with parameters
Hi there
I've just published a new site for a client, where the old site had a lot of urls with parameters indexed.
I wan't to 301 redirect those where possible, but with my current rule i still end up with the id in the new url :/
Example:
www.mysite.com/showItem.php?item_id=123&type=test
I then rewrite like this:
This lands me the url of:
www.mysite.com/newpage.aspx?item_id=test
I get the correct page, but clearly i want the parameters excluded. How to go about this? I've searched the forums and google for a while and can't seem to find an example on how to do this with urlrewrite rules as the one above.
Any help is highly appreciated!
Anyone?
Hey Martin,
I'm not entirely sure about this but does it help replacing virtual URL with "http://www.mysite.com/showItem.php" ?
Grtz
L
is working on a reply...