Get a Jumpstart with our Sample Apps
Results 1 to 17 of 17

Thread: SEO friendly url's & subfolders

  1. #1
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default SEO friendly url's & subfolders

    I want to have SEO friendly url's for a multilanguage website & it is my understanding that I best create each page for each language.

    Say I have 2 languages "nl" & "fr"

    I would like url's like www.company.be/nl/product1.a5w which is much nicer than www.company.be/nl-product1.a5w

    If I read the wikipage http://wiki.alphasoftware.com/How+to...+subfolders-nl then it seems that this is not possible.

    In fact if I do try it and create a grid component in the project root folder & put it on an A5W page in the "nl" subfolder I get a security error,
    if I create the component in the "nl" subfolder then I cannot insert it onto an A5W page that I created in the "nl" subfolder.

    Has anyone been doing what I intend to do?

  2. #2
    "Certified" Alphaholic
    Real Name
    eric
    Join Date
    Mar 2009
    Location
    Amsterdam
    Posts
    1,280

    Default Re: SEO friendly url's & subfolders

    To my understanding all grids must be placed in the apps webroot to acivate security.


    c:\a5webroot is oke
    c:\A5webroot\xxxx is oke
    c:\a5webroot\xxxx\nl\ not oke
    c:\a5webroot\myapps\nl\xxxx is not

    Argument for the wishlist?

  3. #3
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    To complete my question: I want and index.a5w page in c:\a5webroot , this page only offers a language choice "nl" or "fr"
    depending on the user's choice this index page would link to pages in c:\a5webroot\nl or c:\a5webroot\fr

  4. #4
    "Certified" Alphaholic
    Real Name
    eric
    Join Date
    Mar 2009
    Location
    Amsterdam
    Posts
    1,280

    Default Re: SEO friendly url's & subfolders

    Quote Originally Posted by Clipper87 View Post
    To complete my question: I want and index.a5w page in c:\a5webroot , this page only offers a language choice "nl" or "fr"
    depending on the user's choice this index page would link to pages in c:\a5webroot\nl or c:\a5webroot\fr

    This is not so long ago subject on the Board for discussion. Exactly what you are looking for is a page with a choice list for the language. Then using the case statement a, b​​, c a redirect to the page you need.
    search argument is <translation>

  5. #5
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    Eric

    Point is I want the same pagename for every language version of that page

  6. #6
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Posts
    1,302

    Default Re: SEO friendly url's & subfolders

    Imagine that Alphas web components would act like a special (session)variables and Alpha would allow to use templates for html pages and you could put to this kind of html-template your component as placeholders like this: <%a5 MyComponentName %> and when this page renders the component will show on page.

    If this would be possible the same page name for every language would be a peace of cake.

    But I am just dreaming.

  7. #7
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,738

    Default Re: SEO friendly url's & subfolders

    I'd say it is completely possible. Alpha's code for the component (on the A5W page) is exactly the same except for the component name within the code, about 17 time unfortunaltey. That area is just xbasic, so you could replace the component name with a variable, accounting for how Alpha trims long component names.

    Or you could insert ALL of your components on the same page and toggle in the correct one with:

    <%a5
    select
    case session.lang="fr"
    %>
    ..fr component html
    <%a5 case session.lang = "en" %>
    ..en component html
    <%a5 case else
    ..fr component html
    <%a5 end select %>

    Or other variations using a5_include().

    I'd probably write a function so I could use this syntax:

    <%a5 mylangcomponent(session.lang,"abc") %>

    where "abc" was the base component name, and session.lang told the function what prefix to apply:

    fr_basecomponentname
    en_basecomponentname
    etc.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  8. #8
    "Certified" Alphaholic
    Real Name
    eric
    Join Date
    Mar 2009
    Location
    Amsterdam
    Posts
    1,280

    Wink Re: SEO friendly url's & subfolders

    For each component a different language if you suggest means component 200 * 4 languages ​​is a lot of work.
    Correction to a grid component x * language is impossible, I have an idea about good solution but I first want to test properly, and keep on dreaming indicating what Ken's half what you can do to yourself a lot of results. Ken also has his answer on the other hand certain logic that there is a need in the area of multiple language support including using templates. But because they are not there or do not meet my expectations but I fill that dream itself

  9. #9
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    Steve,

    Wouldn't you end up with pages that are not indexable then?

  10. #10
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    I'm making progress; I create a junction in a5webroot for my different languages.

    mklink /j nl c:\a5webroot
    mklink /j fr c:\a5webroot

    This allows to have a page in c:\a5webroot\index.a5w that acts as a language selector with links in it for nl\product.a5w & fr\product.a5w both pointing to c:\a5webroot\product.a5w

    now I have to tackle the seo stuff; google crawlers do not work with session variables so the product.a5w page needs to now somehow what language to use without session variables

    Anybody?

  11. #11
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    OK this is my solution that seems to work:

    mklink /j nl c:\a5webroot
    mklink /j fr c:\a5webroot

    This allows to have a page in c:\a5webroot\index.a5w that acts as a language selector with links in it for nl\product.a5w & fr\product.a5w both pointing to c:\a5webroot\product.a5w

    in product.a5w I check if left(request.scriptname,3) = "fr" then I include product_fr.a5w else I include product_nl.a5w

    if someone browses to company.com\product.a5w then it would produce the dutch version as default language (same as browsing to company.com\nl\product.a5w)

    Now I wonder if someone sees any other problems as to why this would not work: security ? Ajax stuff? it all happens in the webroot folder so...?

  12. #12
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,738

    Default Re: SEO friendly url's & subfolders

    I think you will find it impossible to maintain that system. Try placing A5W pages in folders in your development build of Alpha, try adding components to those pages (the ones in subfolders).
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  13. #13
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    Quote Originally Posted by Steve Wood View Post
    I think you will find it impossible to maintain that system. Try placing A5W pages in folders in your development build of Alpha, try adding components to those pages (the ones in subfolders).
    That does not work :

    In fact if I do try it and create a grid component in the project root folder & put it on an A5W page in the "nl" subfolder I get a security error,
    if I create the component in the "nl" subfolder then I cannot insert it onto an A5W page that I created in the "nl" subfolder.

  14. #14
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    Turns out that using junctions you can make any SEO friendly url you like while all your code remains in webroot.

    mklink /j nl c:\a5webroot
    mklink /j products c:\a5webroot

    This will allow to browse for \\company.com\nl\products\product1.a5w & \\company.com\products\nl\product1.a5w

    If you don't like the second url then you can redirect a request for it to a 404 page.

  15. #15
    Member
    Real Name
    Steven P.
    Join Date
    May 2008
    Location
    Belgium
    Posts
    81

    Default Re: SEO friendly url's & subfolders

    Hi,

    I actually send an email to Richard about this since I have the same issue at hand. I want to have nl and fr folders. I never got a reply though. However, it's clear that Alphafive can't handle directories where you place components and a5w page in. The css link is read from the webroot directory.

    What you could do is as Steve Wood said, create one page with the components in different languages and dependent on a session variable show the component you want. Then when you deal with text, load the html from
    the database instead of having it statically in the a5w page.

  16. #16
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    Quote Originally Posted by Steven P. View Post
    Hi,

    I actually send an email to Richard about this since I have the same issue at hand. I want to have nl and fr folders. I never got a reply though. However, it's clear that Alphafive can't handle directories where you place components and a5w page in. The css link is read from the webroot directory.

    What you could do is as Steve Wood said, create one page with the components in different languages and dependent on a session variable show the component you want. Then when you deal with text, load the html from
    the database instead of having it statically in the a5w page.
    Steven,

    This is the way I will probably implement it (still need to add errorchecking to generate 404 errorpage if needed):

    I have a page test.a5w which will always be shown in the url, the content however depends on the language; either testfr.a5w or testnl.a5w
    So basically every page that is accessible via url will just be a selector page & all others will never show up in a url to the use browsing the site.


    <%a5
    ?request.scriptname
    if left(request.scriptname,3)="/fr"
    a5w_include("testfr.a5w")
    else
    a5w_include("testnl.a5w")
    end if
    %>
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  17. #17
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: SEO friendly url's & subfolders

    Just came across this interesting blog so I thought reviving this thread wouldn't hurt: http://www.seomoz.org/blog/should-i-...y-urls-for-seo
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

Similar Threads

  1. 301 Redirect for SEO
    By aburningflame in forum Application Server Version 10 - Web/Browser Applications
    Replies: 7
    Last Post: 01-27-2013, 09:47 PM
  2. SEO
    By arniebg in forum General Questions
    Replies: 3
    Last Post: 06-04-2011, 01:00 PM
  3. Friendly URLs
    By Steve Wood in forum Application Server Version 9 - Web/Browser Applications
    Replies: 5
    Last Post: 05-06-2009, 04:14 PM
  4. Developers - what SEO's do you use?
    By Wanda Tucker in forum Alpha Five Version 5
    Replies: 14
    Last Post: 07-26-2004, 10:52 AM
  5. Q: Is v5 more developer friendly?
    By Eric Ruff in forum Alpha Five Version 5
    Replies: 4
    Last Post: 07-23-2002, 11:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •