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.
>>>>>
>>>>>
>>>>> Diane Blackmore wrote:
>>>>>> Hi
>>>>>>
>>>>>> I have a need for a solution to rewrite =96 =either by mod_rewrite or
>>>>>> other =96 the following URL syntax;
>>>>>>
>>>>>> url needs to go from:
>>>>>>
>>>>>>
>>>>>>
>> http://launch72.cohesion.co.nz/online/index.csn?pageNam=e=3Dadvertiser_vacanci>>
>> >>
>> e
>>>>>> =s&var1=3Dvar1&var2=3Dvar2&var3=3Dvar3
>>>>>>
>>>>>> etc
>>>>>>
>>>>>> to
>>>>>>
>>>>>>
>> http://launch72.cohesion.co.nz/online/advertiser_va=cancies.csn?var1=3Dvar1&va>>
>> >>
>> r
>>>>>> =2=3Dvar2&var3=3Dvar3
>>>>
>>>>>> etc
>>>>>>
>>>>>>
>>>>>> Happy to pay for this as a job, but its just =not worth my learning
>>>>>> mod_rewrite for this one thing, and it=92s =kinda advanced given I=92m a
>>>>>> beginner at such things.
>>>>>>
>>>>>> You can contact me off list if you want to =negotiate, otherwise if you
>>>>>> look at the above and go =93oh for heaven=92s =sake that=92s too easy=94 and
>>>>>> jst want to answer it here and now for the =greater good of the WebDNA
>>>>>> community, knock your socks off.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>
>>>>> =---------------------------------------------------------
>>>>> This message is sent to you because you are =subscribed to
>>>>> the mailing list <talk@webdna.us>.
>>>>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>>>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>>>>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>>>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> =---------------------------------------------------------
>>>> This message is sent to you because you are subscribed =to
>>>> the mailing list <talk@webdna.us>.
>>>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>>>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>>>
>>> =---------------------------------------------------------
>>> This message is sent to you because you are subscribed =to
>>> the mailing list <talk@webdna.us>.
>>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>>>
>>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------
>> This message is sent to you because you are subscribed to
>> the mailing list <talk@webdna.us>.
>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>
> ---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> archives: http://mail.webdna.us/l=ist/talk@webdna.us
> old archives: http://dev.webdna.us/TalkLi=stArchive/
> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>
>
<image.gif>
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.
>>>>>
>>>>>
>>>>> Diane Blackmore wrote:
>>>>>> Hi
>>>>>>
>>>>>> I have a need for a solution to rewrite =96 =either by mod_rewrite or
>>>>>> other =96 the following URL syntax;
>>>>>>
>>>>>> url needs to go from:
>>>>>>
>>>>>>
>>>>>>
>> http://launch72.cohesion.co.nz/online/index.csn?pageNam=e=3Dadvertiser_vacanci>>
>> >>
>> e
>>>>>> =s&var1=3Dvar1&var2=3Dvar2&var3=3Dvar3
>>>>>>
>>>>>> etc
>>>>>>
>>>>>> to
>>>>>>
>>>>>>
>> http://launch72.cohesion.co.nz/online/advertiser_va=cancies.csn?var1=3Dvar1&va>>
>> >>
>> r
>>>>>> =2=3Dvar2&var3=3Dvar3
>>>>
>>>>>> etc
>>>>>>
>>>>>>
>>>>>> Happy to pay for this as a job, but its just =not worth my learning
>>>>>> mod_rewrite for this one thing, and it=92s =kinda advanced given I=92m a
>>>>>> beginner at such things.
>>>>>>
>>>>>> You can contact me off list if you want to =negotiate, otherwise if you
>>>>>> look at the above and go =93oh for heaven=92s =sake that=92s too easy=94 and
>>>>>> jst want to answer it here and now for the =greater good of the WebDNA
>>>>>> community, knock your socks off.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>
>>>>> =---------------------------------------------------------
>>>>> This message is sent to you because you are =subscribed to
>>>>> the mailing list <talk@webdna.us>.
>>>>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>>>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>>>>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>>>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> =---------------------------------------------------------
>>>> This message is sent to you because you are subscribed =to
>>>> the mailing list <talk@webdna.us>.
>>>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>>>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>>>
>>> =---------------------------------------------------------
>>> This message is sent to you because you are subscribed =to
>>> the mailing list <talk@webdna.us>.
>>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>>>
>>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------
>> This message is sent to you because you are subscribed to
>> the mailing list <talk@webdna.us>.
>> To unsubscribe, E-mail to: <talk-leave@webdna.us>
>> archives: http://mail.webdna.us/l=ist/talk@webdna.us
>> old archives: http://dev.webdna.us/TalkLi=stArchive/
>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>
> ---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> archives: http://mail.webdna.us/l=ist/talk@webdna.us
> old archives: http://dev.webdna.us/TalkLi=stArchive/
> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=
>
>
<image.gif>
DOWNLOAD WEBDNA NOW!
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...