Welcome! Log In Create A New Profile

Advanced

String replace on rewrite module

July 20, 2010 09:22AM
My goal is simple. Rewrite the following URL:

[b]http://example.com/path/to/folder/image/picture1.jpg[/b]

to

[b]http://example.com/image/path_to_folder/picture1.jpg[/b]

My doubt is: how can I transform [b]path/to/folder[/b] into [b]path_to_folder[/b]?

In fact, all I want to know is how to [b]substitute the forward slashes "/" by underscores "_"[/b]

The path/to/folder can be nested in unknown levels (as in path/to/a/very/deep/level/folder )

Is there a "string replace" function in rewrite module to do this? Or something else?

Thanks!
Subject Author Posted

String replace on rewrite module

jbruni July 20, 2010 09:22AM

Re: String replace on rewrite module

Alex Sergeyev July 20, 2010 09:38AM

Re: String replace on rewrite module

Alex Sergeyev July 20, 2010 09:48AM

Re: String replace on rewrite module

jbruni July 20, 2010 10:57AM

Re: String replace on rewrite module

Mikhail Mazursky July 21, 2010 12:36AM

Re: String replace on rewrite module

Alex Sergeyev July 21, 2010 09:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready