Re: [WebDNA] Clean URLS job - will pay

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 104928
interpreted = N
texte = --Apple-Mail-64--631949397 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Diane To me is sounds like the rule is looping and ending up showing the = pagename as index (as the rule implies), I would have thought that the = [L] flag would have stopped that from happening. So I assume your final url is looking like: index.csn?pageName=3Dindex&var1=3D1var&var2=3D2var&var3=3D3var If you change the flag to [L] does it still work or swap them around = [QSA,L] ? Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 03/03/2010, at 12:55 PM, Diane Blackmore (Cohesion) wrote: > Hi >=20 > Sorry Stuart but I just don=92t know how much more info I can give =96 = I=92ve colour coded the relevant bits and everything, and already = explained this as best I can. [pagename] is not a reserved variable =96 = it=92s not meant to reveal the [thisurl] variable which is a whole = different thing. >=20 > I can=92t give you access to this in a full URL that you can visit = because I=92m having to turn on the rewrite only when I test. >=20 > Basically, I need the rewrite rule to take the part before the =93.csn=94= and throw it in as a variable in part 2 of the the rule =96 as I=92ve = coloured purple. It also needs to append the rest of the variables, = which it is doing fine. >=20 > At the moment the rewrite says the [pagename] variable is =93index=94 = when it needs to be =93accommodation=94. I don=92t know why because I=92d = have thought that in the rule below =93$1=94 would take the bit as = ([A-Za-z0-9_]+) and use that.... But it=92s not. >=20 >> >> RewriteEngine on >> RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 [L,QSA] >> >=20 >=20 > Thanks, >=20 > on 3/3/10 2:31 PM, Stuart Tremain at webdna@idfk.com.au wrote: >=20 >> and what is happening now ??? >>=20 >> please c&p the url ....... >>=20 >> Regards >>=20 >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >> On 03/03/2010, at 12:22 PM, Diane Blackmore (Cohesion) wrote: >>=20 >>> Hi >>>=20 >>> I want the URL >>>=20 >>> accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var >>>=20 >>> To rewrite to >>>=20 >>> index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&var3=3D3var= >>>=20 >>>=20 >>> Thanks, >>>=20 >>>=20 >>> on 3/3/10 2:06 PM, Stuart Tremain at webdna@idfk.com.au wrote: >>>=20 >>> > Diane >>> >=20 >>> > Please show us exactly what the url becomes .... and what you want = it to be. >>> >=20 >>> >=20 >>> > Regards >>> >=20 >>> > Stuart Tremain >>> > IDFK Web Developments >>> > AUSTRALIA >>> > webdna@idfk.com.au >>> >=20 >>> >=20 >>> >=20 >>> >=20 >>> > On 03/03/2010, at 11:29 AM, Diane Blackmore (Cohesion) wrote: >>> >=20 >>> >> Hi >>> >>=20 >>> >>>> RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 = [L,QSA] >>> >>=20 >>> >> If you look at the code you'll see that pageName is a variable - = it's not a >>> >> reference to the name of the page that's doing the processing. >>> >>=20 >>> >> It's value should be that of the name of the page in the first = part of the >>> >> rewrite rule.... In the example; >>> >>=20 >>> >>>> .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var >>> >>=20 >>> >> Under the rule, this should go to; >>> >>=20 >>> >>>> = .../index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&var3=3D3var= >>> >>=20 >>> >>=20 >>> >>=20 >>> >> Cheers, >>> >>=20 >>> >>=20 >>> >> on 3/3/10 12:33 PM, Stuart Tremain at webdna@idfk.com.au wrote: >>> >>=20 >>> >>> Page name will always be index.csn as that is the name of the = template not=20 >>> >>> the >>> >>> url. If you need the value of the url, you will need to pass = that as a >>> >>> variable. >>> >>>=20 >>> >>> =46rom memory [ThisURL] will also display index.csn >>> >>>=20 >>> >>> Regards >>> >>>=20 >>> >>> Stuart Tremain >>> >>> IDFK Web Developments >>> >>> AUSTRALIA >>> >>> webdna@idfk.com.au >>> >>>=20 >>> >>>=20 >>> >>>=20 >>> >>>=20 >>> >>> On 03/03/2010, at 10:23 AM, Diane Blackmore (Cohesion) wrote: >>> >>>=20 >>> >>>> Hi >>> >>>>=20 >>> >>>> Back to this.... BTW you guys on the list are all awesome... >>> >>>>=20 >>> >>>> Matthew - Can confirm that your method seems to best achieve = what I'm=20 >>> >>>> after, >>> >>>> and that mod_rewrite is working on the server. Problem is now = as follows; >>> >>>>=20 >>> >>>> Using your exact rewrite rule below, the URL >>> >>>>=20 >>> >>>> .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var >>> >>>>=20 >>> >>>> Now successfully goes to the right place. The problem is that = according to >>> >>>> the WebDNA template (index.csn) that it's rewriting to, the = variables=20 >>> >>>> aren't >>> >>>> being carried over quite right.... >>> >>>>=20 >>> >>>> In the above example, the variables var1, var2, var3 are all OK = so the >>> >>>> problem clearly isn't with the QSA string. >>> >>>>=20 >>> >>>> The problem is that the pageName variable has become 'index' = for some >>> >>>> reason... Perhaps getting this from some other part of the = rule. >>> >>>>=20 >>> >>>> Any ideas on this one?? If I can get this sorted I'll have the = whole thing >>> >>>> nailed. >>> >>>>=20 >>> >>>>=20 >>> >>>> Cheers, >>> >>>>=20 >>> >>>>=20 >>> >>>> on 16/2/10 11:07 AM, Matthew Bohne at = matthew.bohne@benetela.com wrote: >>> >>>>=20 >>> >>>>> Should be able to do it with this. The [L] means it is the = last rule >>> >>>>> parsed, and the [QSA] tells mod_rewrite to pass the query = string also. >>> >>>>>=20 >>> >>>>> >>> >>>>> RewriteEngine on >>> >>>>> RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 = [L,QSA] >>> >>>>> >>> >>>>>=20 >>> >>>>> That said, mod_rewrite is worth learning. >>> >>>>>=20 >>> >>>>>=20 >=20 >=20 >=20 > --Apple-Mail-64--631949397 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Diane

To me is sounds like the rule is looping and = ending up showing the pagename as index (as the rule implies), I would = have thought that the [L] flag would have stopped that from = happening.

So I assume your final url is = looking like:

index.csn?pageName=3Dindex&var1=3D1var&var2=3D2var&var3=3D3var<= /span>

If you change the = flag to [L] does it still work or swap them around [QSA,L] = ?

Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 03/03/2010, at 12:55 PM, Diane Blackmore (Cohesion) = wrote:

Hi

Sorry Stuart but I just don=92t know how much more info I can give =96 = I=92ve colour coded the relevant bits and everything, and already = explained this as best I can. [pagename] is not a reserved variable =96 = it=92s not meant to reveal the [thisurl] variable which is a whole = different thing.

I can=92t give you access to this in a full URL that you can visit = because I=92m having to turn on the rewrite only when I test.

Basically, I need the rewrite rule to take the part before the =93.csn=94 =  and throw it in as a variable in part 2 of the the rule =96 as = I=92ve coloured purple. It also needs to append the rest of the = variables, which it is doing fine.

At the moment the rewrite says the [pagename] variable is =93index=94 = when it needs to be =93accommodation=94. I don=92t know why because I=92d = have thought that in the rule below =93$1=94 would take the bit as = ([A-Za-z0-9_]+) and use that.... But it=92s not.

<IfModule = mod_rewrite.c>
RewriteEngine on
RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 [L,QSA]
</IfModule>


Thanks,

on 3/3/10 2:31 PM, Stuart Tremain at webdna@idfk.com.au wrote:

and what is happening = now ???

please c&p the url .......

Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA
webdna@idfk.com.au




On 03/03/2010, at 12:22 PM, Diane Blackmore (Cohesion) wrote:

Hi

I want the URL

accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var

To rewrite to

index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&var3=3D3var


Thanks,


on 3/3/10 2:06 PM, Stuart Tremain at webdna@idfk.com.au wrote:

> Diane
>
> Please show us exactly what the url becomes .... and what you want = it to be.
>
>
> Regards
>
> Stuart Tremain
> IDFK Web Developments
> AUSTRALIA
> webdna@idfk.com.au
>
>
>
>
> On 03/03/2010, at 11:29 AM, Diane Blackmore (Cohesion) wrote:
>
>> Hi
>>
>>>> RewriteRule = ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 [L,QSA]
>>
>> If you look at the code you'll see that pageName is a variable = - it's not a
>> reference to the name of the page that's doing the = processing.
>>
>> It's value should be that of the name of the page in the first = part of the
>> rewrite rule.... In the example;
>>
>>>> = .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var
>>
>> Under the rule, this should go to;
>>
>>>> = .../index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&= ;var3=3D3var
>>
>>
>>
>> Cheers,
>>
>>
>> on 3/3/10 12:33 PM, Stuart Tremain at webdna@idfk.com.au wrote:
>>
>>> Page name will always be = index.csn as that is the name of the template not
>>> the
>>> url. If you need the value of the url, you will need to = pass that as a
>>> variable.
>>>
>>> =46rom memory [ThisURL] will also display index.csn
>>>
>>> Regards
>>>
>>> Stuart Tremain
>>> IDFK Web Developments
>>> AUSTRALIA
>>> webdna@idfk.com.au
>>>
>>>
>>>
>>>
>>> On 03/03/2010, at 10:23 AM, Diane Blackmore (Cohesion) = wrote:
>>>
>>>> Hi
>>>>
>>>> Back to this.... BTW you guys on the list are all = awesome...
>>>>
>>>> Matthew - Can confirm that your method seems to best = achieve what I'm
>>>> after,
>>>> and that mod_rewrite is working on the server. Problem = is now as follows;
>>>>
>>>> Using your exact rewrite rule below, the URL
>>>>
>>>> = .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var
>>>>
>>>> Now successfully goes to the right place. The problem = is that according to
>>>> the WebDNA template (index.csn) that it's rewriting to, = the variables
>>>> aren't
>>>> being carried over quite right....
>>>>
>>>> In the above example, the variables var1, var2, var3 = are all OK so the
>>>> problem clearly isn't with the QSA string.
>>>>
>>>> The problem is that the pageName variable has become = 'index' for some
>>>> reason... Perhaps getting this from some other part of = the rule.
>>>>
>>>> Any ideas on this one?? If I can get this sorted I'll = have the whole thing
>>>> nailed.
>>>>
>>>>
>>>> Cheers,
>>>>
>>>>
>>>> on 16/2/10 11:07 AM, Matthew Bohne at matthew.bohne@benetela.com = wrote:
>>>>
>>>>> Should be able to do it with this. The [L] means it = is the last rule
>>>>> parsed, and the [QSA] tells mod_rewrite to pass the = query string also.
>>>>>
>>>>> <IfModule mod_rewrite.c>
>>>>> RewriteEngine on
>>>>> RewriteRule ^([A-Za-z0-9_]+).csn?$ = index.csn?pageName=3D$1 [L,QSA]
>>>>> </IfModule>
>>>>>
>>>>> That said, mod_rewrite is worth learning.
>>>>>
>>>>>



<image.gif>


= --Apple-Mail-64--631949397-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Clean URLS job - will pay (Dan Strong 2010)
  2. RE: [WebDNA] Clean URLS job - will pay (matthew.bohne@benetela.com 2010)
  3. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  4. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  5. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  6. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  7. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  8. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  9. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  10. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  11. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  12. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  13. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  14. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  15. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  16. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  17. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  18. Re: [WebDNA] Clean URLS job - will pay (Terry Wilson 2010)
  19. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  20. [BULK] Re: [WebDNA] Clean URLS job - will pay (Dan Strong 2010)
  21. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  22. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  23. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  24. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  25. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  26. Re: [WebDNA] Clean URLS job - will pay (Kenneth Grome 2010)
  27. Re: [WebDNA] Clean URLS job - will pay (Lawrence 2010)
  28. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  29. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  30. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  31. Re: [WebDNA] Clean URLS job - will pay (Lawrence 2010)
  32. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  33. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  34. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  35. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  36. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  37. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  38. Re: [WebDNA] Clean URLS job - will pay (Diane Blackmore 2010)
  39. Re: [WebDNA] Clean URLS job - will pay (Diane Blackmore 2010)
  40. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  41. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  42. [WebDNA] Clean URLS job - will pay (Diane Blackmore 2010)
--Apple-Mail-64--631949397 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Diane To me is sounds like the rule is looping and ending up showing the = pagename as index (as the rule implies), I would have thought that the = [L] flag would have stopped that from happening. So I assume your final url is looking like: index.csn?pageName=3Dindex&var1=3D1var&var2=3D2var&var3=3D3var If you change the flag to [L] does it still work or swap them around = [QSA,L] ? Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 03/03/2010, at 12:55 PM, Diane Blackmore (Cohesion) wrote: > Hi >=20 > Sorry Stuart but I just don=92t know how much more info I can give =96 = I=92ve colour coded the relevant bits and everything, and already = explained this as best I can. [pagename] is not a reserved variable =96 = it=92s not meant to reveal the [thisurl] variable which is a whole = different thing. >=20 > I can=92t give you access to this in a full URL that you can visit = because I=92m having to turn on the rewrite only when I test. >=20 > Basically, I need the rewrite rule to take the part before the =93.csn=94= and throw it in as a variable in part 2 of the the rule =96 as I=92ve = coloured purple. It also needs to append the rest of the variables, = which it is doing fine. >=20 > At the moment the rewrite says the [pagename] variable is =93index=94 = when it needs to be =93accommodation=94. I don=92t know why because I=92d = have thought that in the rule below =93$1=94 would take the bit as = ([A-Za-z0-9_]+) and use that.... But it=92s not. >=20 >> >> RewriteEngine on >> RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 [L,QSA] >> >=20 >=20 > Thanks, >=20 > on 3/3/10 2:31 PM, Stuart Tremain at webdna@idfk.com.au wrote: >=20 >> and what is happening now ??? >>=20 >> please c&p the url ....... >>=20 >> Regards >>=20 >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >> On 03/03/2010, at 12:22 PM, Diane Blackmore (Cohesion) wrote: >>=20 >>> Hi >>>=20 >>> I want the URL >>>=20 >>> accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var >>>=20 >>> To rewrite to >>>=20 >>> index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&var3=3D3var= >>>=20 >>>=20 >>> Thanks, >>>=20 >>>=20 >>> on 3/3/10 2:06 PM, Stuart Tremain at webdna@idfk.com.au wrote: >>>=20 >>> > Diane >>> >=20 >>> > Please show us exactly what the url becomes .... and what you want = it to be. >>> >=20 >>> >=20 >>> > Regards >>> >=20 >>> > Stuart Tremain >>> > IDFK Web Developments >>> > AUSTRALIA >>> > webdna@idfk.com.au >>> >=20 >>> >=20 >>> >=20 >>> >=20 >>> > On 03/03/2010, at 11:29 AM, Diane Blackmore (Cohesion) wrote: >>> >=20 >>> >> Hi >>> >>=20 >>> >>>> RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 = [L,QSA] >>> >>=20 >>> >> If you look at the code you'll see that pageName is a variable - = it's not a >>> >> reference to the name of the page that's doing the processing. >>> >>=20 >>> >> It's value should be that of the name of the page in the first = part of the >>> >> rewrite rule.... In the example; >>> >>=20 >>> >>>> .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var >>> >>=20 >>> >> Under the rule, this should go to; >>> >>=20 >>> >>>> = .../index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&var3=3D3var= >>> >>=20 >>> >>=20 >>> >>=20 >>> >> Cheers, >>> >>=20 >>> >>=20 >>> >> on 3/3/10 12:33 PM, Stuart Tremain at webdna@idfk.com.au wrote: >>> >>=20 >>> >>> Page name will always be index.csn as that is the name of the = template not=20 >>> >>> the >>> >>> url. If you need the value of the url, you will need to pass = that as a >>> >>> variable. >>> >>>=20 >>> >>> =46rom memory [thisurl] will also display index.csn >>> >>>=20 >>> >>> Regards >>> >>>=20 >>> >>> Stuart Tremain >>> >>> IDFK Web Developments >>> >>> AUSTRALIA >>> >>> webdna@idfk.com.au >>> >>>=20 >>> >>>=20 >>> >>>=20 >>> >>>=20 >>> >>> On 03/03/2010, at 10:23 AM, Diane Blackmore (Cohesion) wrote: >>> >>>=20 >>> >>>> Hi >>> >>>>=20 >>> >>>> Back to this.... BTW you guys on the list are all awesome... >>> >>>>=20 >>> >>>> Matthew - Can confirm that your method seems to best achieve = what I'm=20 >>> >>>> after, >>> >>>> and that mod_rewrite is working on the server. Problem is now = as follows; >>> >>>>=20 >>> >>>> Using your exact rewrite rule below, the URL >>> >>>>=20 >>> >>>> .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var >>> >>>>=20 >>> >>>> Now successfully goes to the right place. The problem is that = according to >>> >>>> the WebDNA template (index.csn) that it's rewriting to, the = variables=20 >>> >>>> aren't >>> >>>> being carried over quite right.... >>> >>>>=20 >>> >>>> In the above example, the variables var1, var2, var3 are all OK = so the >>> >>>> problem clearly isn't with the QSA string. >>> >>>>=20 >>> >>>> The problem is that the pageName variable has become 'index' = for some >>> >>>> reason... Perhaps getting this from some other part of the = rule. >>> >>>>=20 >>> >>>> Any ideas on this one?? If I can get this sorted I'll have the = whole thing >>> >>>> nailed. >>> >>>>=20 >>> >>>>=20 >>> >>>> Cheers, >>> >>>>=20 >>> >>>>=20 >>> >>>> on 16/2/10 11:07 AM, Matthew Bohne at = matthew.bohne@benetela.com wrote: >>> >>>>=20 >>> >>>>> Should be able to do it with this. The [L] means it is the = last rule >>> >>>>> parsed, and the [QSA] tells mod_rewrite to pass the query = string also. >>> >>>>>=20 >>> >>>>> >>> >>>>> RewriteEngine on >>> >>>>> RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 = [L,QSA] >>> >>>>> >>> >>>>>=20 >>> >>>>> That said, mod_rewrite is worth learning. >>> >>>>>=20 >>> >>>>>=20 >=20 >=20 >=20 > --Apple-Mail-64--631949397 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Diane

To me is sounds like the rule is looping and = ending up showing the pagename as index (as the rule implies), I would = have thought that the [L] flag would have stopped that from = happening.

So I assume your final url is = looking like:

index.csn?pageName=3Dindex&var1=3D1var&var2=3D2var&var3=3D3var<= /span>

If you change the = flag to [L] does it still work or swap them around [QSA,L] = ?

Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 03/03/2010, at 12:55 PM, Diane Blackmore (Cohesion) = wrote:

Hi

Sorry Stuart but I just don=92t know how much more info I can give =96 = I=92ve colour coded the relevant bits and everything, and already = explained this as best I can. [pagename] is not a reserved variable =96 = it=92s not meant to reveal the [thisurl] variable which is a whole = different thing.

I can=92t give you access to this in a full URL that you can visit = because I=92m having to turn on the rewrite only when I test.

Basically, I need the rewrite rule to take the part before the =93.csn=94 =  and throw it in as a variable in part 2 of the the rule =96 as = I=92ve coloured purple. It also needs to append the rest of the = variables, which it is doing fine.

At the moment the rewrite says the [pagename] variable is =93index=94 = when it needs to be =93accommodation=94. I don=92t know why because I=92d = have thought that in the rule below =93$1=94 would take the bit as = ([A-Za-z0-9_]+) and use that.... But it=92s not.

<IfModule = mod_rewrite.c>
RewriteEngine on
RewriteRule ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 [L,QSA]
</IfModule>


Thanks,

on 3/3/10 2:31 PM, Stuart Tremain at webdna@idfk.com.au wrote:

and what is happening = now ???

please c&p the url .......

Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA
webdna@idfk.com.au




On 03/03/2010, at 12:22 PM, Diane Blackmore (Cohesion) wrote:

Hi

I want the URL

accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var

To rewrite to

index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&var3=3D3var


Thanks,


on 3/3/10 2:06 PM, Stuart Tremain at webdna@idfk.com.au wrote:

> Diane
>
> Please show us exactly what the url becomes .... and what you want = it to be.
>
>
> Regards
>
> Stuart Tremain
> IDFK Web Developments
> AUSTRALIA
> webdna@idfk.com.au
>
>
>
>
> On 03/03/2010, at 11:29 AM, Diane Blackmore (Cohesion) wrote:
>
>> Hi
>>
>>>> RewriteRule = ^([A-Za-z0-9_]+).csn?$ index.csn?pageName=3D$1 [L,QSA]
>>
>> If you look at the code you'll see that pageName is a variable = - it's not a
>> reference to the name of the page that's doing the = processing.
>>
>> It's value should be that of the name of the page in the first = part of the
>> rewrite rule.... In the example;
>>
>>>> = .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var
>>
>> Under the rule, this should go to;
>>
>>>> = .../index.csn?pageName=3Daccommodation&var1=3D1var&var2=3D2var&= ;var3=3D3var
>>
>>
>>
>> Cheers,
>>
>>
>> on 3/3/10 12:33 PM, Stuart Tremain at webdna@idfk.com.au wrote:
>>
>>> Page name will always be = index.csn as that is the name of the template not
>>> the
>>> url. If you need the value of the url, you will need to = pass that as a
>>> variable.
>>>
>>> =46rom memory [thisurl] will also display index.csn
>>>
>>> Regards
>>>
>>> Stuart Tremain
>>> IDFK Web Developments
>>> AUSTRALIA
>>> webdna@idfk.com.au
>>>
>>>
>>>
>>>
>>> On 03/03/2010, at 10:23 AM, Diane Blackmore (Cohesion) = wrote:
>>>
>>>> Hi
>>>>
>>>> Back to this.... BTW you guys on the list are all = awesome...
>>>>
>>>> Matthew - Can confirm that your method seems to best = achieve what I'm
>>>> after,
>>>> and that mod_rewrite is working on the server. Problem = is now as follows;
>>>>
>>>> Using your exact rewrite rule below, the URL
>>>>
>>>> = .../accommodation.csn?var1=3D1var&var2=3D2var&var3=3D3var
>>>>
>>>> Now successfully goes to the right place. The problem = is that according to
>>>> the WebDNA template (index.csn) that it's rewriting to, = the variables
>>>> aren't
>>>> being carried over quite right....
>>>>
>>>> In the above example, the variables var1, var2, var3 = are all OK so the
>>>> problem clearly isn't with the QSA string.
>>>>
>>>> The problem is that the pageName variable has become = 'index' for some
>>>> reason... Perhaps getting this from some other part of = the rule.
>>>>
>>>> Any ideas on this one?? If I can get this sorted I'll = have the whole thing
>>>> nailed.
>>>>
>>>>
>>>> Cheers,
>>>>
>>>>
>>>> on 16/2/10 11:07 AM, Matthew Bohne at matthew.bohne@benetela.com = wrote:
>>>>
>>>>> Should be able to do it with this. The [L] means it = is the last rule
>>>>> parsed, and the [QSA] tells mod_rewrite to pass the = query string also.
>>>>>
>>>>> <IfModule mod_rewrite.c>
>>>>> RewriteEngine on
>>>>> RewriteRule ^([A-Za-z0-9_]+).csn?$ = index.csn?pageName=3D$1 [L,QSA]
>>>>> </IfModule>
>>>>>
>>>>> That said, mod_rewrite is worth learning.
>>>>>
>>>>>



<image.gif>


= --Apple-Mail-64--631949397-- Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Umm...about those log files? (Off Topic) (1997) Searching Numbers (2004) Spawn doesn't work as advertised ... (2000) Protect (1997) Re[3]: 2nd WebCatalog2 Feature Request (1996) Reenter store and find cart (2003) Field name-subcategory (1997) Cart Question (1998) WebCat2b13MacPlugIn - syntax to convert date (1997) Webstar 1.3.1 PPC (1997) emailer error 103 part ii (1997) expired beta (1997) A question on sub-categories (1997) Trouble Searching (1999) [SearchString] (1998) WebCat2b15MacPlugIn - [authenticate] not [protect] (1997) webcat page crashes MSIE 5 on mac (2000) WebCat2 - [format thousands] (1997) webcat- multiple selection in input field (1997) hiding tpls from ftp (1999)