SitePoint Sponsor

User Tag List

Results 1 to 25 of 49

Hybrid View

  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Article Discussion

    This is an article discussion thread for discussing the SitePoint article, "Search Engine-Friendly URLs"

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,449
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    This article is old but still very relevant. Implementing what I learned in this article has had a profound impact on my websites. To score it a 10 would be to under-rate its value.

  3. #3
    SitePoint Zealot mrWoot's Avatar
    Join Date
    Jan 2004
    Location
    Wisconsin
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I used it when I converted everything from ASP to PHP. VERY useful. 10/10

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    IMHO, Chris Beasley missed the best solution (and gets, at best, a 6/10 for his effort).

    Sitepoint's Apache forum has MANY good threads on using Apache's mod_rewrite module in the .htaccess file. With this, I've just completed transitioning from a series of $_GET style URLs to Search Engine Optimized pages (i.e., the http://www.domainname.com/article/## displays the /viewfullarticle?id=## script). There were some knotty things to work out but I believe this is far superior to Chris's path_info, Error Pages and ForceType. Anyone interested in SEO should have a read of Chris's article then have a search through the Apache forum for mod_rewrite (online documentation on mod-rewrite is terrible -- that forum has provided the best information I've found).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    earth
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Prefer mod_rewrite here as well.

  6. #6
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Illinois, USA
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    forcetype application

    Have used this and prefer it, however it appears busted in http 2.0

    www.site.com/script involkes the (or even a script with symlinks
    enabled to script.php but

    www.site.com/script/parms doesn't even get envolked anymore ?

    Was using
    <location
    which maybe should have/be
    <file

    but neither works now.

    Any suggestions?

  7. #7
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Illinois, USA
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siliconsorcerer
    Have used this and prefer it, however it appears busted in http 2.0

    www.site.com/script involkes the (or even a script with symlinks
    enabled to script.php but

    www.site.com/script/parms doesn't even get envolked anymore ?

    Was using
    <location
    which maybe should have/be
    <file

    but neither works now.

    Any suggestions?
    Oh man nothing like being a dope....
    Looks like AcceptPathInfo on is the answer.

  8. #8
    SitePoint Member
    Join Date
    Aug 2004
    Location
    93402
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fircetype Solution Seems Incompatible with Web Log Tools

    I've used the Forcetype solution, and have become aware that Web Log tools (e.g., LiveStats) can not report page activity, because none of my URLs end in file extensions.

    Any advice?

  9. #9
    SitePoint Evangelist djdykes's Avatar
    Join Date
    Feb 2005
    Location
    Chester, Cheshire
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the only thing missing in this article is what the links should become! as a novice i struggled as the links kept altering. other then that seems to work fine. any one got any tips how to add security to these methods?

  10. #10
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    You should notice an improvement in SE rankings but also bear in mind your visitors.
    It is far easier to type www.mydomain.com/site than www.mydomain.com/site/id=1&template=id...... etc
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  11. #11
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ForceType doesn't seems to work (apache 2.2 / php 5.1.6)

    i tried
    Code:
    <Files tag> 
        #ForceType application/x-httpd-php 
        #SetHandler application/x-httpd-php 
        #SetHandler application/x-httpd-php5 
        #ForceType x-httpd-php 
        #ForceType application/x-httpd-php5 
        #AddHandler application/x-httpd-php5 .php
        ForceType php5-cgi
    </Files>
    Any more suggestions?

  12. #12
    SitePoint Enthusiast Mounty's Avatar
    Join Date
    Mar 2008
    Location
    UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try out this one for mod rewrite:

    Code:
    RewriteEngine On
    RewriteCond &#37;{QUERY_STRING} ^(.*)$
    RewriteRule ^(.*/)?([^/]+)/([^/]+) $1?$2=$3&%1 [L]
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^.*$ index.php?%1 [L]
    It recursively iterates over the request and replaces 'field/val/' with 'field = val'. I don't know if it is technically SEO index friendly or not though.

  13. #13
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interestingly enough my re-write script was really simple and because I was already using $_SERVER('REQUEST_URI) to extract and then later explode the url into chuncks, I didnt even have to modify my original page handler.

    I simply send the data in the same format but mod-rewite avoids having to send a 404 error back to the user:

    ErrorDocument 404 /error.php

    RewriteEngine on
    #news index
    RewriteRule ^latest-news/ myPageHandlerScript.php
    RewriteRule ^latest-news myPageHandlerScript.php
    #news details
    RewriteRule ^latest-news/article/([a-zA-Z&0-9-.:@]+)/([0-9]+) myPageHandlerScript.php
    #news pagination
    RewriteRule ^latest-news/([0-9]+)/([0-9]+)/([0-9]+) myPageHandlerScript.php
    #projects
    RewriteRule ^our-work/([a-zA-Z&0-9-.:@]+)/([a-zA-Z&0-9-.:@]+)/([0-9]+) myPageHandlerScript.php
    #services
    RewriteRule ^our-services/ myPageHandlerScript.php
    #services details
    RewriteRule ^our-services/([a-zA-Z&0-9-.:@]+)/([0-9]+) myPageHandlerScript.php

    #services details
    RewriteRule ^sitemap/ sitemap.php
    RewriteRule ^sitemap sitemap.php

    etc

    It works really well, XML generatin works perfectly now and presents no unexpected errors, this one is SEO friendly throughout.

    You can see it in action here: http://www.bigwebcompany.co..uk


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
  •