Dynamic Webpage URL?

Discussion in 'Search Engine Optimization' started by lostdog, Nov 10, 2006.

  1. #1
    lostdog, Nov 10, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Search engines should be able to index and rank your pages just fine, especially as you only have 1 parameter (which is good). The only reasons to go for the rewritten form is a) better keywords in url and b) looks better to the user.

    If it's a lot of work, the I wouldn't worry about it. It might be possible to create a single rewrite expression for all your pages. You'd need to change the st=al to st=alabama, and then adapt your code to deal with it.

    Cryo.
     
    Cryogenius, Nov 10, 2006 IP
  3. Auriga

    Auriga Guest

    Messages:
    155
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    http://www.americanhomeinspectordire...tors.php?st=al

    can be translated to

    http://www.americanhomeinspectordirectory.com/alabama

    by including a .htaccess in the main directory with

    [begin file]

    # Enable mod_rewrite, start rewrite engine
    Options +FollowSymLinks
    RewriteEngine on

    # This line will change a static url into a dynamic one
    RewriteRule ^([^/.]+)/?$ /index.php?cat=$1 [L]

    # The next lines are to get from dynamic to static urls. This way, the urls to
    # your webpages will be dynamic in search engines like Google.
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?st=([^&]+)\ HTTP/
    RewriteRule ^index\.php$ http://www.americanhomeinspectordire...tors.com/%1? [R=301,L]


    [end file]

    But maybe you already knew how to write htaccess files...

    Hope to help!
    Auriga
     
    Auriga, Nov 10, 2006 IP
  4. dastuff

    dastuff Peon

    Messages:
    475
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes also depending on the age of your site, it may not be worth breaking all of those links (or writing a lot of 301 rewrites), just for the extra keyword in the url.. If it's a relatively new site I recommend you do it b/c it looks much nicer...

    If not, It's water under the bridge.. Just remember this for next time :D
     
    dastuff, Nov 10, 2006 IP
  5. lostdog

    lostdog Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks to all. The site is has been around for awhile. We did change the program that runs the site and the pages are now .php The search engines found them and ranked the quick enough but not as high as they used to be. All of our State pages ranked in the to 10 before but now in the top 20. Since the urls did change in the past six months I don't know if I should do it or not?
     
    lostdog, Nov 10, 2006 IP