aspose file tools*
The moose likes Other Open Source Projects and the fly likes URLRewrite by Turkey Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "URLRewrite by Turkey" Watch "URLRewrite by Turkey" New topic
Author

URLRewrite by Turkey

Vishal Baid
Ranch Hand

Joined: Jul 18, 2012
Posts: 42
    
    1
Hi Guys

I am facing problem in URL Rewrite.
I am using turkey for this.

My urlrewite.xml is looking like this :

<urlrewrite>
<outbound-rule>
<from>/control/(.*)$</from>
<to>/$1</to>
</outbound-rule>

<rule>
<from>^/w_product/~product_id=(.*)/(.*)$</from>
<to type="forward">/control/w_product/abcdefghijkl/$1</to>
</rule>

<rule>
<from>^/(.*)$</from>
<to type="forward">/control/$1</to>
</rule>
</urlrewrite>

Everything is working except if the url is looking like :

https://127.0.0.1:8444/control/w_product/~product_id=600131LIVE/~Denise_Mainquist/~PCI_DSS:__Tips_and_Trends_for_2010

Please help me guys.
Thanks in advance
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi vishal,
try to encode the url

Regards
Jatan
Vishal Baid
Ranch Hand

Joined: Jul 18, 2012
Posts: 42
    
    1
jatan bhavsar wrote:Hi vishal,
try to encode the url

Regards
Jatan


Jatan Can you tell me properly ? I am new to urlRewrite. I get success in some of the url. But this one for me the difficult one.
Vishal Baid
Ranch Hand

Joined: Jul 18, 2012
Posts: 42
    
    1
I change my rule like this :

<rule>
<from>^/w_product/~product_id=(.*)/~(.*)/~(.*)$</from>
<to type="forward">/control/w_product?product_id=$1</to>
</rule>

Even then it is not working.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLRewrite by Turkey