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: Replacing + with - from querystring
Author
Message |
NTQB
Newbie


Joined: 24 February 2010
Posts: 24
Posted: 23 November 2011 at 9:11am

I want to replace the + with - from query string.

My rule looks like this:

RewriteRule ^([^-]+)\+([^-]+)$ $1-$2 [LP,R=301]
RewriteRule ^photos-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.htm$ photos/$6/$4/$2/ [NC,R=301,L]

The replace it doesn't work.

Do you have any idea? 

Thanks!

Back to Top Visit NTQB's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 24 November 2011 at 5:33am

Hello,

Would you please provide the examples of requested URLs and rewrite.log for the testing request.
Logging issues described in FAQ

Regards
Andrew
Back to Top
 
NTQB
Newbie


Joined: 24 February 2010
Posts: 24
Posted: 24 November 2011 at 7:14am

Hello,

Original URL: photos.asp?name=al+pacino&profession=actor&nid=3266

Old Rewrite URL: photos-name-al+pacino-profession-actor-nid-3266.htm

New Rewrite URL: photos/al+pacino/actor/3266/

I want to replace the + from the new rewrite url with -

The Rewrite.log is empty.

Thank you!
Back to Top Visit NTQB's Homepage
 
NTQB
Newbie


Joined: 24 February 2010
Posts: 24
Posted: 28 November 2011 at 3:31am

The solution was:
RewriteRule ^(.*)\s(.*)$ $1-$2 [LP,R=301,L]
Thanks!
Back to Top Visit NTQB's Homepage
 

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

Printable version Printable version