Post Reply 
i want to remove a part of url
Sep. 26, 2011, 06:30 AM
Post: #1
i want to remove a part of url
hello every one,
i want to remove a part of url
ex:
http://www.example.com/opera10-turbo.ope.../www.1.com

i want remove
opera10-turbo.opera-mini.net
thanks.hello every one,
i want to remove a part of url
ex:
http://www.example.com/opera10-turbo.ope.../www.1.com

i want remove
opera10-turbo.opera-mini.net
thanks.
Add Thank You Quote this message in a reply
Sep. 28, 2011, 02:07 AM
Post: #2
RE: i want to remove a part of url
Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "! : RDIR: remove opera10-turbo.opera-mini.net/ (out)"
URL = "(^/+/)\0opera10-turbo.opera-mini.net/\1&$RDIR(http://\0\1)"

HTH
Add Thank You Quote this message in a reply
Sep. 28, 2011, 10:47 AM
Post: #3
RE: i want to remove a part of url
On a related theme, is it possible to auto-convert links like this :-

http://uk.mobile.reuters.com/shortArticle/topNews/idUKTRE78R0PA20110928
http://uk.mobile.reuters.com/shortArticle/scienceNews/idUKTRE78Q5UT20110927
http://uk.mobile.reuters.com/shortArticle/internetNews/idUKTRE78R00Q20110928

To become (respectively) :-

http://uk.mobile.reuters.com/article/topNews/idUKTRE78R0PA20110928
http://uk.mobile.reuters.com/article/scienceNews/idUKTRE78Q5UT20110927
http://uk.mobile.reuters.com/article/internetNews/idUKTRE78R00Q20110928

I've tried to highlight the various components.

The red words can be any of a dozen variants, but are the same in the source and target URLs.

The green sections are GUIDs, but also the same in the source and target URLs.

The blue word "short" is always the same, and always to be cut.

The remainder in black is always the same.

For explanation and testing, you can visit this page: http://uk.mobile.reuters.com/category/topNews

From there, I want to be able to click any of the main story links, and jump directly to the "Full Article" version of the story, which is otherwise only accessible after clicking the shortArticle link.

Can anyone help, please?
Add Thank You Quote this message in a reply
Sep. 28, 2011, 02:42 PM
Post: #4
RE: i want to remove a part of url
(Sep. 28, 2011 10:47 AM)Dave Guest Wrote:  On a related theme, is it possible to auto-convert links like this

Try

Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "! : RDIR: uk.mobile.reuters.com short to full 11/09/28 (out)"
URL = "(uk.mobile.reuters.com/)\0shortArticle(/[^/]++News/*)\1&$RDIR(http://\0article\1)"

HTH
Add Thank You Quote this message in a reply
Sep. 28, 2011, 03:54 PM
Post: #5
RE: i want to remove a part of url
(Sep. 28, 2011 02:42 PM)JJoe Wrote:  Try
Code:
...
HTH

Spot on, thanks Smile!
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: