This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: problem to transform url
Author
Message |
imago
Newbie


Joined: 13 January 2012
Location: Italy
Posts: 1
Posted: 13 January 2012 at 2:02pm

Hi, after much wandering through forums and documentation
are not able to get on top of a simple problem for me is
not exactly simple.

I explain the problem: I have this site address
mydominio.it/page.asp?cat=la prova del cuoco&id=3

I would like to turn it into mydominio.it/page/la-prova-
del-cuoco/3.htm

thanks
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 16 January 2012 at 4:08am

Hello,

Try using the following:

Code:
# mydominio.it/page.asp?cat=la prova del cuoco&id=3 ---> mydominio.it/page/la-prova-del-cuoco/3.htm
RewriteCond %{QUERY_STRING} ^cat=([^&]+)&id=(\d+)$ [NC]
RewriteRule ^([^./]+)\.asp$ /$1/%1/%2 [NC,R=301,L]

#replaces all spaces with '-' in all URLs
RewriteRule ^(\S+)(?:\s|\%20)(.*)$ $1-$2 [LP,NC]


Regards
Andrew
Back to Top
 

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

Printable version Printable version