Re: [WebDNA] Clean URLS job - will pay

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 104922
interpreted = N
texte = 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 no= t the > url. If you need the value of the url, you will need to pass that as a > variable. >=20 > From 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 af= ter, >> 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 ar= en'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 thi= ng >> 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 >>> Diane Blackmore wrote: >>>> Hi >>>>=20 >>>> I have a need for a solution to rewrite =AD either by mod_rewrite or >>>> other =AD the following URL syntax; >>>>=20 >>>> url needs to go from: >>>>=20 >>>>=20 >>>>=20 http://launch72.cohesion.co.nz/online/index.csn?pageName=3Dadvertiser_vacanci= >>>> e >>>> s&var1=3Dvar1&var2=3Dvar2&var3=3Dvar3 >>>>=20 >>>> etc >>>>=20 >>>> to >>>>=20 >>>>=20 http://launch72.cohesion.co.nz/online/advertiser_vacancies.csn?var1=3Dvar1&va= >>>> r >>>> 2=3Dvar2&var3=3Dvar3 >>=20 >>>> etc >>>>=20 >>>>=20 >>>> Happy to pay for this as a job, but its just not worth my learning >>>> mod_rewrite for this one thing, and it=B9s kinda advanced given I=B9m a >>>> beginner at such things. >>>>=20 >>>> You can contact me off list if you want to negotiate, otherwise if you >>>> look at the above and go =B3oh for heaven=B9s sake that=B9s too easy=B2 and >>>> jst want to answer it here and now for the greater good of the WebDNA >>>> community, knock your socks off. >>>>=20 >>>>=20 >>>>=20 >>>> Regards, >>>>=20 >>>>=20 >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> old archives: http://dev.webdna.us/TalkListArchive/ >>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D= 288 >>>=20 >>>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ >> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D2= 88 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D28= 8 >=20 >=20 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)
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 no= t the > url. If you need the value of the url, you will need to pass that as a > variable. >=20 > From 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 af= ter, >> 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 ar= en'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 thi= ng >> 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 >>> Diane Blackmore wrote: >>>> Hi >>>>=20 >>>> I have a need for a solution to rewrite =AD either by mod_rewrite or >>>> other =AD the following URL syntax; >>>>=20 >>>> url needs to go from: >>>>=20 >>>>=20 >>>>=20 http://launch72.cohesion.co.nz/online/index.csn?pageName=3Dadvertiser_vacanci= >>>> e >>>> s&var1=3Dvar1&var2=3Dvar2&var3=3Dvar3 >>>>=20 >>>> etc >>>>=20 >>>> to >>>>=20 >>>>=20 http://launch72.cohesion.co.nz/online/advertiser_vacancies.csn?var1=3Dvar1&va= >>>> r >>>> 2=3Dvar2&var3=3Dvar3 >>=20 >>>> etc >>>>=20 >>>>=20 >>>> Happy to pay for this as a job, but its just not worth my learning >>>> mod_rewrite for this one thing, and it=B9s kinda advanced given I=B9m a >>>> beginner at such things. >>>>=20 >>>> You can contact me off list if you want to negotiate, otherwise if you >>>> look at the above and go =B3oh for heaven=B9s sake that=B9s too easy=B2 and >>>> jst want to answer it here and now for the greater good of the WebDNA >>>> community, knock your socks off. >>>>=20 >>>>=20 >>>>=20 >>>> Regards, >>>>=20 >>>>=20 >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> old archives: http://dev.webdna.us/TalkListArchive/ >>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D= 288 >>>=20 >>>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ >> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D2= 88 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D28= 8 >=20 >=20 "Diane Blackmore (Cohesion)"

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:

WebCat & Liststar ... & Rumpus, too! (1997) Appending data from an IFrame (2002) how to check for no value while using [URL] to prevent cr (1999) [WebDNA] [ReturnRaw] problem (2010) Handy Browser Counter Tip (1997) OT: Validating user input (2004) Questions (1998) # of real domains on 1 web server (1997) [WebDNA] Mac Mountain Lion installation (2013) different show next (1997) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) WebDelivery: One step closer !! (1997) TCPconnect in a DB? (1999) ShowIf variables (1997) default value from Lookup (was Grant, please help me) (1997) Where's 3.0 Online Docs? (1999) Sorting Numbers (1997) search multiple (2002) Occasional crashes with $remove (1997) Exclude by date - multiple (1997)