Page 1 of 2 12 LastLast
Results 1 to 15 of 27

Thread: The Perfect Search Engine URL

  1. #1
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default The Perfect Search Engine URL

    I've had a first look at using the mod_rewrite MOD to produce the perfect Search Engine URL.

    Given my limited knowledge of the Apache mod_rewrite function, two options appear to be available:

    1. use the php file name in the URL
    2. enter all of the URLs in the htaccess file

    For an example of the first, the URL could be
    HTML Code:
    http://www.indexuhelp.com/indexu32e/browse-business_to_business-1.html
    For the second option. it could be either:
    HTML Code:
    http://www.indexuhelp.com/indexu32e/business_to_business.html
    or
    http://www.indexuhelp.com/indexu32e/business_to_business-1.html
    A word about the dash and underscore in the name used in the URL. In general, to display a page you need 3 bits of information:

    1. the PHP file used to generate the page, e.g., browse.php
    2. which category to display
    3. which page of a multi-part listing to display

    A regular php url would look lilke
    HTML Code:
    http://www.indexuhelp.com/indexu32e/browse.php?cat=2&pgwhich=5
    Your browser would read this as: use the browse.php file to display page 5 of the category #2 listing.

    Well, the mod-rewrite function still needs the same information. That is why you see
    HTML Code:
    http://www.indexuhelp.com/indexu32e/browse-business_to_business-5.html
    The mod_write separates the information based on the dashes:

    1. browse- tells the mod-write function to use the browse.php file ( and not any other file like the detail.php file )
    2. -business_to_business- tells the mod-write function to display the business_to_business category
    3. and the -5 says to display page 5 of the business_to_business category

    I said all of that to illustrate this point. If I now use dashes in the category name, I end up with
    HTML Code:
    http://www.indexuhelp.com/indexu32e/browse-business-to-business-5.html
    and the mod_rewrite interprets the dashes in business-to-business as "bits" of information and becomes confused.

    Unless, I can find a way around that, I must use something other than dashes within the category name. Thus, the use of underscores.

    If you have a small number categories, you could just enter them in the htaccess file. But there is a "time" penalty assocciated with loading that file and another "time penalty" to read the contents of the file.

    Just some first thoughts.


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  2. #2
    inspireme is offline Active Member
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    Intresting post.

    It would be intresting to know how much difference this would actually make? google recently (about 6 months ago) changed their search engine so that it can index php pages with up to 5 variables in the url (according to webpro news)

    Wouldnt all the _underscores_ be seen as an attempt to spam by google? google is very fussy about things like that. Anything that helps increase search position will always be appreciated.

  3. #3
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    I will leave it to others to debate the effects of _underscores_ but I have seen them in URLs on some very popular sites.

    Do you have a link to the webpro news article? I tried a search on their site but got a "fatal" error.


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  4. #4
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    while I have not finished testing the mod_rewrite for the above, I am beginning to think that it cannot produce the perfect URL. While I happen to have come to really like the mod_rewrite feature, my knowledge is not good enough to tell me if there is more that can be done than what I have described above. My instincts say no. but I will pursue it some more.

    having said that, I may look again at creating a static page MOD. I have seen aladdin's and even if I could understand the coding ( which I do not ), I cannot use it for my own. So, maybe I will try to create my own. I like my own stuff anyway... I'm sure it won't look anything like his. at least the code that is. but the effects would be the same.

    I'm not sure if I can even do it or how long it will take even if I can ulitmately do it but I will at least start.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  5. #5
    Marlboro is offline Registered User
    Join Date
    Oct 2001
    Location
    Hawaii and California
    Posts
    45

    Default

    Hi ESM:
    Can't tell you how much we appreciate you taking your time and applying your expertise to look at 3.2 and working on it to making it more URL friendly. Be looking forward to seeing if you have a major break through down the road and or success on your own static page MOD.

  6. #6
    Marlboro is offline Registered User
    Join Date
    Oct 2001
    Location
    Hawaii and California
    Posts
    45

    Default

    The debate rages. Some swear dashes in domain names send rankings soaring.


    http://www.webpronews.com/ebusiness/...kingsMore.html

  7. #7
    Marlboro is offline Registered User
    Join Date
    Oct 2001
    Location
    Hawaii and California
    Posts
    45

    Default

    Directory Structure :
    Keep your directory as shallow as possible:

    http://www.smartads.info/articles/se...th-having.html

    Search engines will determine the pagerank of each page based on its content, and distance away from your homepage. Use this as a rule of thumb; each level down from your homepage will cost that page one pagerank point.

  8. #8
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    well, I like the mod_rewrite MOD and for small sites, this is certainly a viable option.

    but I think, ultimately, a successful site starts with Search Engine friendly URLS. If it takes a static page to achieve that, then it is at least worth the effort.

    So, if I understand correctly, the main INDEXU index page that lists all the top level categories should be on a page, say content.html ( would you have an index.html page that does an automatic referral to the content.html page ??? ).

    On the content.html page, a category hyperlink would show something like http:www.mysite.com/business-and-commerce.html for say, a category. and on the business-and-commerce.html page you would have other categories and/or links, each of which would have a hyperlink similar to http:www.mysite.com/business-and-commerce.html or http:www.mysite.com/bed-and-breakfast-atlanta-georgia.html, etc.

    not to mention the ability to automatically use fields from the database to populate the <title>, meta tags, etc...



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  9. #9
    Marlboro is offline Registered User
    Join Date
    Oct 2001
    Location
    Hawaii and California
    Posts
    45

    Default

    Hi ESM:

    I just spent the last hour going back and forth between nicecoders demo and yours to make sure that what I was seeing was not a mod.

    Having no experience with 3.2 - correct me if i am wrong -It appears that the only reason that everything on both sites does not appear to be at at the first level is only because these were both set up as demo sites.

    If set up not as a demo then all categories in 3.2E are at the first level.

    Am I correct in that http://www.indexuhelp.com/indexu32e/...iness-1-1.html

    could have just as easily been set up as:

    http://www.indexuhelp.com/business_to_business-1-1.html

    If this is correct then half the battle is won.

    Please advise!

  10. #10
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    technically, it is not because my site is a demo site.

    it is that way because I elected to install INDEXU to the indexu32e folder. I actually have several versions of INDEXU installed; all of them access the same database.

    I could have just as easily installed INDEXU to the rool directory. the URL would have then read http://www.indexuhelp.com/business_to_business-1-1.html

    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  11. #11
    Marlboro is offline Registered User
    Join Date
    Oct 2001
    Location
    Hawaii and California
    Posts
    45

    Default

    Hey ESM:

    My apologizes on my part - bad choice of words. Just meant that it was not installed to the root directory as you said.

    What would you think of me purchasing a V3.2E and seeing what I can get done to get the URL conversion. I have always wanted to run one of your modified scripts.

  12. #12
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    take a look at it now...

    http://www.indexuhelp.com/indexu32e/index.php

    still using _underscores_ but not to bad on the category URLs...

    still more to do but it is 2:30 am and I have to get up at 5:30




    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  13. #13
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    you may owe me on this one, big guy, but I may have just thought of a way to use -dashes- in the URLs.....!

    but then I am a decrepit old man, too...

    tomorrow will tell...
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  14. #14
    Marlboro is offline Registered User
    Join Date
    Oct 2001
    Location
    Hawaii and California
    Posts
    45

    Default

    Hi ESM:

    The progress on this is getting beyond amazing ! I would like nothing better than to
    owe you big time. The URL's are looking great. Can't wait to see how the new idea works on the underscores.

  15. #15
    inspireme is offline Active Member
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    I get the webpro news newstletter, they do seem to change their mind all the time, but I will try and look for some relevant acticles.

Page 1 of 2 12 LastLast

Similar Threads

  1. Search engine friendly URL
    By aladdin in forum v3.2
    Replies: 2
    Last Post: 01-12-2005, 05:27 PM
  2. Replies: 0
    Last Post: 02-13-2004, 09:56 PM
  3. Search
    By joyorudis in forum v3.2
    Replies: 0
    Last Post: 09-18-2002, 08:50 AM
  4. Search Box on third party sites !
    By ideavirus in forum v3.2
    Replies: 0
    Last Post: 08-31-2002, 08:59 AM
  5. Search engine on other sites?
    By vertygo in forum v5.x
    Replies: 2
    Last Post: 04-03-2002, 08:23 PM

Posting Permissions

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