3.0 URLs -> 3.0 FriendlyURLs url rewrite

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

3.0 URLs -> 3.0 FriendlyURLs url rewrite

Jamie Orchard-Hays
I'm working on a servlet filter rewrite pattern to translate 3.0 URLs to
3.0 Friendly URLs (using https://urlrewrite.dev.java.net/) and it
occured to me that someone might have already written the RegEx for this.

If you have please share! I actually enjoy RegEx, but thought someone
might have solved this problem already.

Jamie

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: 3.0 URLs -> 3.0 FriendlyURLs url rewrite

Henri Dupre
I wrote my own servlet filter for this. I found that the regex were
too complex and also I wanted to transform the parameters and use the
DataSqueezer. I can share the code if you are interested.

On 5/25/05, Jamie Orchard-Hays <[hidden email]> wrote:

> I'm working on a servlet filter rewrite pattern to translate 3.0 URLs to
> 3.0 Friendly URLs (using https://urlrewrite.dev.java.net/) and it
> occured to me that someone might have already written the RegEx for this.
>
> If you have please share! I actually enjoy RegEx, but thought someone
> might have solved this problem already.
>
> Jamie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Thanks,

Henri.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: 3.0 URLs -> 3.0 FriendlyURLs url rewrite

richard.hensley
Henri, I would like to see that code. I have a problem where I'm migrating a
very old mod_perl application that has a WIDE variety of url pattern's and
parameters. There are a number that have been widely book marked and I need
to preserve the book marks and direct them to the new application. I was
considering urlrewrite, but like you I need something a little less regex
complex and a little more tapestry aware.

-----Original Message-----
From: Henri Dupre [mailto:[hidden email]]
Sent: Thursday, May 26, 2005 6:31 AM
To: Tapestry development
Cc: Tapestry users
Subject: Re: 3.0 URLs -> 3.0 FriendlyURLs url rewrite

I wrote my own servlet filter for this. I found that the regex were
too complex and also I wanted to transform the parameters and use the
DataSqueezer. I can share the code if you are interested.

On 5/25/05, Jamie Orchard-Hays <[hidden email]> wrote:

> I'm working on a servlet filter rewrite pattern to translate 3.0 URLs to
> 3.0 Friendly URLs (using https://urlrewrite.dev.java.net/) and it
> occured to me that someone might have already written the RegEx for this.
>
> If you have please share! I actually enjoy RegEx, but thought someone
> might have solved this problem already.
>
> Jamie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Thanks,

Henri.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: 3.0 URLs -> 3.0 FriendlyURLs url rewrite

Jamie Orchard-Hays
I figured I'd share my rewrites with you guys in case you're interested

:
<urlrewrite>

     <!--
         Rules for ResetService and AssetService are not included, as
they shouldn't be needed for this app.
     -->

     <rule enabled="true">
         <name>App</name>
         <note>
             Handles /app
         </note>
         <from>^(.*/)app$</from>
         <to type="redirect">/career-student$1home.svc</to>
     </rule>

     <rule enabled="true">
         <name>External Link</name>
         <note>
             Handles ExternalLinks
         </note>
         <from>^(.*/)app\?service=external/([a-zA-Z0-9]+)&amp;(.*)$</from>
         <to type="redirect">/career-student$1$2.tap?$3</to>
     </rule>

     <rule enabled="true">
         <name>Page Link</name>
         <note>
             Handles PageLinks
         </note>
         <from>^(.*/)app\?service=page/([a-zA-Z0-9]+)$</from>
         <to type="redirect">/career-student$1$2.tap</to>
     </rule>

     <rule enabled="true">
         <name>Home Service</name>
         <note>
             Handles Home service
         </note>
         <from>^(.*/)app\?service=home(.*)$</from>
         <to type="redirect">/career-student$1home.svc</to>
     </rule>

     <rule enabled="true">
         <name>Restart Service</name>
         <note>
             Handles Restart service
         </note>
         <from>^(.*/)app\?service=restart(.*)$</from>
         <to type="redirect">/career-student$1restart.svc</to>
     </rule>

     <rule enabled="true">
         <name>Simple Direct Link</name>
         <note>
             Handles simple DirectLinks
         </note>
         <from>^(.*/)app\?service=direct/([0-9])/([a-zA-Z0-9]+)/(.*)$</from>
         <to
type="redirect">/career-student$1$3.tap\?service=direct\&amp;service=$2\&amp;service=$4</to>
     </rule>

     <rule enabled="true">
         <name>Complex Direct Link</name>
         <note>
             Handles complex DirectLinks
         </note>
 
<from>^(.*/)app\?service=direct/([0-9])/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/(.*)$</from>
         <to
type="redirect">/career-student$1$3.tap\?service=direct\&amp;service=$2\&amp;service=$4\&amp;service=$5</to>
     </rule>

     <rule enabled="true">
         <name>Simple Action Link</name>
         <note>
             Handles simple ActionLinks
         </note>
 
<from>^(.*/)app\?service=action/([0-9])/([a-zA-Z0-9]+)/(.*)/(.*)$</from>
         <to
type="redirect">/career-student$1$3.tap\?service=action\&amp;service=$2\&amp;service=$4\&amp;service=$5</to>
     </rule>

     <rule enabled="true">
         <name>Complex Action Link</name>
         <note>
             Handles complex ActionLinks
         </note>
 
<from>^(.*/)app\?service=action/([0-9])/([a-zA-Z0-9]+)/(.*)/([a-zA-Z0-9]+)/(.*)$</from>
         <to
type="redirect">/career-student$1$3.tap\?service=action\&amp;service=$2\&amp;service=$4\&amp;service=$5\&amp;service=$6</to>
     </rule>
</urlrewrite>

Hensley, Richard wrote:

> Henri, I would like to see that code. I have a problem where I'm migrating a
> very old mod_perl application that has a WIDE variety of url pattern's and
> parameters. There are a number that have been widely book marked and I need
> to preserve the book marks and direct them to the new application. I was
> considering urlrewrite, but like you I need something a little less regex
> complex and a little more tapestry aware.
>
> -----Original Message-----
> From: Henri Dupre [mailto:[hidden email]]
> Sent: Thursday, May 26, 2005 6:31 AM
> To: Tapestry development
> Cc: Tapestry users
> Subject: Re: 3.0 URLs -> 3.0 FriendlyURLs url rewrite
>
> I wrote my own servlet filter for this. I found that the regex were
> too complex and also I wanted to transform the parameters and use the
> DataSqueezer. I can share the code if you are interested.
>
> On 5/25/05, Jamie Orchard-Hays <[hidden email]> wrote:
>
>>I'm working on a servlet filter rewrite pattern to translate 3.0 URLs to
>>3.0 Friendly URLs (using https://urlrewrite.dev.java.net/) and it
>>occured to me that someone might have already written the RegEx for this.
>>
>>If you have please share! I actually enjoy RegEx, but thought someone
>>might have solved this problem already.
>>
>>Jamie
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [hidden email]
>>For additional commands, e-mail: [hidden email]
>>
>>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]