Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion ParsePath

Date: Sun, 15 Jul 2012 18:01:12 -0700 (PDT)
From: =?UTF-8?Q?Guillaume_Mass=C3=A9?= <mas...@gmail.com>
To: liftweb@googlegroups.com
Message-Id: <a4f15245-e069-45cc-bb6b-b2bcd2929ada@googlegroups.com>
In-Reply-To: <CANpg8PBP6cx8mxEjQVvJppiauvpoqqZvj0OFyDqbT9rWMU4KAA@mail.gmail.com>
References: <e21ea858-189d-4575-bc2a-f86a0fee5f9b@googlegroups.com>
 <CANpg8PBP6cx8mxEjQVvJppiauvpoqqZvj0OFyDqbT9rWMU4KAA@mail.gmail.com>
Subject: Re: [Lift] ParsePath
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_606_1608208.1342400472832"

------=_Part_606_1608208.1342400472832
Content-Type: multipart/alternative; 
	boundary="----=_Part_607_17839885.1342400472832"

------=_Part_607_17839885.1342400472832
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

it gives me a 404

               LiftRules.statelessRewrite.append {
case RewriteRequest( ParsePath( "index" :: id :: Nil, "", _, _ ), _, _ ) =
=3D>=20
RewriteResponse( "index" :: Nil, Map( "id" -> id ) )
}

it try to match localhost:8080/index/3457yerter but I want it to=20
match localhost:8080/3457yerter

               LiftRules.statelessRewrite.append {
case RewriteRequest( ParsePath( id :: Nil, "", _, _ ), _, _ ) =3D>=20
RewriteResponse( Nil, Map( "id" -> id ) )
}

wont work as well

On Sunday, July 15, 2012 6:20:38 PM UTC-4, nafg wrote:
>
> So what's the problem?
>
> Also what about Menu.param?
>
>
> On Sun, Jul 15, 2012 at 6:18 PM, Guillaume Mass=C3=A9 <mas...@gmail.com> =
wrote:
>
>> Hi,
>>
>> I'm really stuck with this rewrite:
>>
>> http://localhost:8080/3457yerter
>> =3D=3D>
>> http://localhost:8080/
>> Map( 'id' -> '3457yerter' )
>>
>> What I got so far:
>> LiftRules.statelessRewrite.append {
>>  case RewriteRequest( ParsePath( "index" :: id :: Nil, "", _, _ ), _, _=
=20
>> ) =3D>=20
>> RewriteResponse( "index", Map( "id" -> id ) )
>>  }
>>
>>  --=20
>> Lift, the simply functional web framework: http://liftweb.net
>> Code: http://github.com/lift
>> Discussion: http://groups.google.com/group/liftweb
>> Stuck? Help us help you:=20
>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>>
>
>
------=_Part_607_17839885.1342400472832
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<div>it gives me a 404</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LiftRules.statelessRewrite.append {</div><=
div><span class=3D"Apple-tab-span" style=3D"white-space:pre">=09=09=09</spa=
n>case RewriteRequest( ParsePath( "index" :: id :: Nil, "", _, _ ), _, _ ) =
=3D&gt;&nbsp;</div><div><span class=3D"Apple-tab-span" style=3D"white-space=
:pre">=09=09=09=09=09=09=09</span>RewriteResponse( "index" :: Nil, Map( "id=
" -&gt; id ) )</div><div><span class=3D"Apple-tab-span" style=3D"white-spac=
e:pre">=09=09</span>}</div></div><div><br></div><div>it try to match localh=
ost:8080/index/3457yerter&nbsp;but I want it to match&nbsp;localhost:8080/3=
457yerter</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp;LiftRules.statelessRewrite.append {</div><div><span cla=
ss=3D"Apple-tab-span" style=3D"white-space: pre; ">=09=09=09</span>case Rew=
riteRequest( ParsePath( id :: Nil, "", _, _ ), _, _ ) =3D&gt;&nbsp;</div><d=
iv><span class=3D"Apple-tab-span" style=3D"white-space: pre; ">=09=09=09=09=
=09=09=09</span>RewriteResponse( Nil, Map( "id" -&gt; id ) )</div><div><spa=
n class=3D"Apple-tab-span" style=3D"white-space: pre; ">=09=09</span>}</div=
></div><div><br></div><div>wont work as well</div><br>On Sunday, July 15, 2=
012 6:20:38 PM UTC-4, nafg wrote:<blockquote class=3D"gmail_quote" style=3D=
"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex=
;"><div dir=3D"ltr">So what's the problem?<div><br></div><div>Also what abo=
ut Menu.param?</div><div><br><br><div class=3D"gmail_quote">On Sun, Jul 15,=
 2012 at 6:18 PM, Guillaume Mass=C3=A9 <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:mas...@gmail.com" target=3D"_blank">mas...@gmail.com</a>&gt;</span> wro=
te:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi,<div><br></div><div>I'm really stuck with=
 this rewrite:</div><div><br></div><div><a href=3D"http://localhost:8080/34=
57yerter" target=3D"_blank">http://localhost:8080/<wbr>3457yerter</a></div>
<div>=3D=3D&gt;</div><div><a href=3D"http://localhost:8080/" target=3D"_bla=
nk">http://localhost:8080/</a><br></div><div>Map( 'id' -&gt; '3457yerter' )=
</div><div><br></div><div>What I got so far:</div><div><div><span style=3D"=
white-space:pre-wrap">=09=09</span>LiftRules.statelessRewrite.<wbr>append {=
</div>
<div><span style=3D"white-space:pre-wrap">=09=09=09</span>case RewriteReque=
st( ParsePath( "index" :: id :: Nil, "", _, _ ), _, _ ) =3D&gt;&nbsp;</div>=
<div><span style=3D"white-space:pre-wrap">=09=09=09=09</span>RewriteRespons=
e( "index", Map( "id" -&gt; id ) )</div>
<div><span style=3D"white-space:pre-wrap">=09=09</span>}</div></div><span><=
font color=3D"#888888"><div><br></div>

<p></p>

-- <br>
Lift, the simply functional web framework: <a href=3D"http://liftweb.net" t=
arget=3D"_blank">http://liftweb.net</a><br>
Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://github.co=
m/lift</a><br>
Discussion: <a href=3D"http://groups.google.com/group/liftweb" target=3D"_b=
lank">http://groups.google.com/<wbr>group/liftweb</a><br>
Stuck? Help us help you: <a href=3D"https://www.assembla.com/wiki/show/lift=
web/Posting_example_code" target=3D"_blank">https://www.assembla.com/wiki/<=
wbr>show/liftweb/Posting_example_<wbr>code</a><br>
</font></span></blockquote></div><br></div></div>
</blockquote>
------=_Part_607_17839885.1342400472832--

------=_Part_606_1608208.1342400472832--