I'm fairly new to web2py and not sure how much my opinion counts, but I have been doing web development for years. I have always found embedded spaces in URL to be a bad thing. The URL can be mis- interrupted. And %20 is just down right ugly. Plus, I'm not convinced that embedded spaces and %20 makes any positive difference for SEO. From what I have read in the past about embedded spaces and %20 in URLs with regard to SEO, both should be avoided. Additional reading:
http://www.ragepank.com/articles/50/spaces-underscores-and-dashes-how-to-name-files/ http://www.internetofficer.com/seo/google-word-separator/ That being said, it is valid to have embedded spaces and %20 in URLs. Because it is valid then I feel web2py should support it though I personally will never use or recommend the use of embedded spaces or %20 URLs. As for Massimo's proposal, I think it is a good suggestion that should make every happy. Just my 2 cents... -KIRBY On Dec 20, 2008, at 7:18 AM, mdipierro wrote: > > I am proposing of making > > this is a test > this%20is%20a%20test > this+is+a+test > this_is_a_test > > equivalent. When you generate the URLs you will be able to choose > which one to display. web2py will read them always with '_'. > > Massimo > > On Dec 20, 3:53 am, mmstud <[email protected]> wrote: >> I don't know the best practice, but i know, i want to make urls rank >> best possible way for search engines. I have seen 4 different ways of >> handling word spaces in url: >> >> 1) %20 >> 2) _ >> 3) - >> 4) + >> >> And so far i have managed to test _ and - marks, of which - works >> better for SEO. One of my tests where done with phrase "multimedia >> audio controller driver" and i created a document to editthis.info > a) multimedia_audio_controller_driver and b) multimedia-audio- >> controller-driver in url. >> >> If you seehttp://www.google.com/search?q=multimedia+audio+controller+driver >> you'll find my test article from 4th page with second approach and >> same article on 8th page with first approach. >> >> And you also see, that google uses + marking spaces. Unfortunately >> editthis gives no changes to test test other options, so best option >> is yet to be searched. >> >> On 20 joulu, 10:18, mdipierro <[email protected]> wrote: >> >>> apps may use request.args[i] to build expressions (for example for >>> eval or open files) without validation because they expect it to >>> contain alphanumeric chars without spaces. I cannot think of a >>> specific issue because there is nothing in web2py that uses this >>> restriction. >> >>> I have a proposal that could make everybody happy. What if any " " >>> or >>> %20 in the URL were automatically replaced by a '_'? >> >> If i think of this, how the url shows up on html page, how it shows >> up >> actual browser url and how args shows up on controller in case of >> this >> proposal? >> >> >> >>> Massimo >> >>> On Dec 20, 2:00 am, mmstud <[email protected]> wrote: >> >>>> Please could you clarify, what kind of security issues it woud >>>> raise? >> >>>> On 20 joulu, 09:07, mdipierro <[email protected]> wrote: >> >>>>> This will not supported. You can change the regex_url in main.py >>>>> but >>>>> this may cause security issues. >> >>>>> Massimo >> >>>>> On Dec 19, 3:13 pm, mmstud <[email protected]> wrote: >> >>>>>> The reason for need of spaces on url traces to my tests over >>>>>> SEO urls. >>>>>> _ under_lined words does not rank as well as -con-cate-nated >>>>>> strings. >>>>>> And finally it seems properly encoded space character works >>>>>> best. So i >>>>>> really need this to work. Also query part of the url is not, >>>>>> where i >>>>>> want to set my keywords, but rather either into directory name >>>>>> or file >>>>>> name. So i think i have to hack main.py... Is there anything >>>>>> else i >>>>>> should take in count? >> >>>>>> -Marko >> >>>>>> On 19 joulu, 20:44, Timothy Farrell <[email protected]> wrote: >> >>>>>>> If you really need it, you can modify the regular expression >>>>>>> in main.py line 39(ish). I did this for a time, but if you >>>>>>> have control of the calling page, it's easier (in web2py) to >>>>>>> convert the args to vars. >>>>>>> -tim >>>>>>> mdipierro wrote:you cannot. On Dec 19, 5:39 am, >>>>>>> mmstud<[email protected]>wrote:How can i accept spaces in a >>>>>>> form of %20 in url? domain.com/app/default/index/my%20space >>>>>>> %20word at the moment i get invalid request from web2py - >>>>>>> Marko-- Timothy Farrell<[email protected]>Computer Guy >>>>>>> Statewide General Insurance Agency (www.swgen.com) > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

