using .htaccess file to get seo friendly URLs using JavaScript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JnrJnr
    New Member
    • Oct 2009
    • 88

    using .htaccess file to get seo friendly URLs using JavaScript

    Hi I have a website with a product page that dynamically creates the page with all its products from a database.
    So I use the .htaccess file to create search engine friendly URLs, for instance: www.festfiresecurity.co/Products.php?val=1
    to
    Clean-Gas-Systems.php
    like this:
    RewriteRule ^Clean-Gas-Systems /Products.php?va l=1

    What I do:
    I have a html menu (for none-javascript users) built with html anchors and I link to a product like this:
    <a href="www.festf iresecurity.co/Products.php?va l=1">Clean Gas</a>
    and successfully see the seo friendly url:
    Clean-Gas-Systems.php

    What I want to achieve:
    I also have a flash menu (for javascript users) that links to the same products. The problem is I dont get or see the seo friendly url when using javascript to navigate to products instead I get the normal query string url:
    Products.php?va l=1

    Does anyone know how to use javascript to navigate to pages and get the correct search engine friendly URL using the .htaccess file like you would get using html anchors?
    Please help.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    since the .htaccess URL rewriting is taking place on the server, all non-seo-friendly urls in the client-HTML must be caused by your HTML-creating code (the flash code?).

    anyways, I would recommend to not use flash at all, even if JS is enabled.

    Comment

    • JnrJnr
      New Member
      • Oct 2009
      • 88

      #3
      Hey, what do you mean "all non-seo-friendly urls in the client-HTML must be caused by your HTML-creating code" ?
      Do you mean it is only possible to do it using html?

      Comment

      • JnrJnr
        New Member
        • Oct 2009
        • 88

        #4
        The none-friendly URLs are all static and hard coded into html anchors. The same goes for javascript.
        I navigate to products in flash menu either with an xml file where the URLs get put in, or I have even tried to make the forms action the none-seo friendly url using javascript.

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          I’m just saying that the .htaccess file has nothing to do with how the links are displayed. all its responsibility is to convert seo-friendly to PHP-readable URIs when you do a HTTP Request.

          Comment

          Working...