Alpha DevCon 2018
Results 1 to 6 of 6

Thread: Friendly URLs

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

    Default Friendly URLs

    Anyone know how to get Alpha's app server to render "friendly URLs" or "FURLs".


    FYI - This is where a 'friendly URL' such as mydomain.com/products/shirts/red-shirt.htm is converted to a dynamic URL such as mydomain.com?id=1001. The friendly one appears in the address bar, the user does not see the true dynamic one.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

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

    Default Re: Friendly URLs

    A response from Alpha says they don't and won't suppor this. Also, that per Google, it is unnecessary as far as SEO anyway.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  3. #3
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,625

    Default Re: Friendly URLs

    What you are looking to do is referred to as "URL Rewriting" and the Application Server does not have any support for it. At one time we planned to add this, but Google's official position is that it is absolutely unnecessary for SEO and our internal experience is that dynamic URLs in the Application Server are properly indexed by search engines. Considering these points and the effort that would be required to implement it, we no longer have any plans to add this.

    For more info on Google's position:

    * 9/22/2008 - http://googlewebmastercentral.blogsp...atic-urls.html
    * 7/24/2007 - http://www.bruceclay.com/blog/archiv...ngine_o_6.html (see first paragraph after bullet list)
    * 10/25/2006 - http://googlewebmastercentral.blogsp...uidelines.html

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

  4. #4
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,055

    Default Re: Friendly URLs

    You could always use Apache alongside Alpha5, rewrite rules make this sort of thing very easy (once you get your head around the rewrite rule syntax!).

    Our website works like this (mostly PHP though, the Alpha5 stuff is on a different box), and there should be several threads that discuss using Apache and Alpha 5 WAS on the same server (but on different ports).

    http://www.charlesworth.com

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

    Default Re: Friendly URLs

    I'm already running Apache in front of my A5 server and read up on the mod_rewrite module as I started to look in to this. I'd have to try, not sure if it will work and I read that the mod_rewrite module is real difficult to implement.

    Have you been able to do what I describe in your Alpha application (not the PHP application).
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  6. #6
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,055

    Default Re: Friendly URLs

    Quote Originally Posted by Steve Wood View Post
    I'm already running Apache in front of my A5 server and read up on the mod_rewrite module as I started to look in to this. I'd have to try, not sure if it will work and I read that the mod_rewrite module is real difficult to implement.

    Have you been able to do what I describe in your Alpha application (not the PHP application).
    It is not as hard as all that, it's how I learned to use .htaccess...

    It's mostly the regex stuff you need to learn and perhaps you already know that?

    The gist in our own .htaccess file is:

    RewriteEngine on

    RewriteRule ^([^/]+)~([^/]+) index.php?section=$1&pg=$2
    RewriteRule ^~([^/]*) index.php?section=$1&pg=home

    The actual swapping is made in the index page itself (in JavaScript so you can do this in Alpha5 as well) because images and text etc. are also being swapped, but you could just as well do the swap directly akin to:

    RewriteRule ^([^/]+)~([^/]+) $1/$2.a5w
    RewriteRule ^~([^/]*) $1/index.a5w

    Or run it via an .a5w page that does all the swapping or redirecting

    RewriteRule ^([^/]+)~([^/]+) swapme.a5w?section=$1&pg=$2
    RewriteRule ^~([^/]*) swapme.a5w?section=$1&pg=home

Similar Threads

  1. Here is a friendly Progress Bar for you to use
    By Mike Thomson in forum Alpha Five Version 6
    Replies: 9
    Last Post: 09-08-2015, 08:41 AM
  2. Associate super controls web urls with appp
    By christobal in forum Archived Wishlist
    Replies: 0
    Last Post: 05-18-2008, 02:19 PM
  3. Q: Is v5 more developer friendly?
    By Eric Ruff in forum Alpha Five Version 5
    Replies: 4
    Last Post: 07-23-2002, 10:47 AM
  4. Printer Friendly from Forum
    By fgpylant in forum Alpha Five Version 4
    Replies: 2
    Last Post: 03-26-2002, 10:39 AM

Bookmarks

Posting Permissions

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