phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Best URI Structure?

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » SEO Principles
::  
Author Message
notepad



Joined: 17 Jul 2007
Posts: 2

Best URI Structure?Posted: Tue Jul 17, 2007 9:12 pm    Post subject: Best URI Structure?

Hello,

I'm sorry if this question has been asked before, I tried to find a search option for the forum, but I couldn't find one.

Anyways, I am in the process of making a e-commerce store. And I am doing it with flat php files, so I can have the URLs however I wan't them. But, I can't decide how to set them up. As I have them now, to get to chandeliers for example (wi4546-112 is a model of one of the chandeliers):

/indoor-lighting/
/indoor-lighting/chandeliers/
/indoor-lighting/chandeliers/wi4546-112.php

But I have read some discussions saying that the URLs should be more like this:

/indoor-lighting
/indoor-lighting/chandeliers
/indoor-lighting/chandeliers/wi4546-112

I'm not sure what to do here... Any advice?

I would be open to other URL style suggestions too.

Thanks,

Brandon
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3301

Best URI Structure?Posted: Wed Jul 18, 2007 9:18 am    Post subject: Re: Best URI Structure?

Welcome Very Happy

If you plan to go for only one sub level for categories, and install your script at the root level, it's ok to go for a double virtual folder structure :

Like : /indoor-lighting/chandeliers/wi4546-112.php

Though, you should keep the last part (wi4546-112.php) reasonably short.

About the suffixes, it will be easier to keep the ending "/" and .php (or .html) if you want to use personalized rewriterules for each cases, with something like :

Code:
RewriteRule ^[a-z0-9]+/[a-z0-9]+/[a-z0-9]+-([0-9]+)\.html /script.php?id=$1[QSA,L,NC]


Otherwise, I'm pretty sure you'll have to send all case to a single script and deal with the REQUEST_URI php wise.

_________________
phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible !
Back to top
notepad



Joined: 17 Jul 2007
Posts: 2

Best URI Structure?Posted: Wed Jul 18, 2007 6:38 pm    Post subject: Re: Best URI Structure?

Hey,

I can't say for sure I will only go one sub level...As I grow, I will probably add 2 sub-categories for certain lighting styles. And you think I should end the pages in "/"? Like this:

/indoor-lighting/chandeliers/wi4546-112/

Or did I misunderstand you? I'm not sure what you mean by the REQUEST_URI, could you expand on that?

Thanks
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13607

Best URI Structure?Posted: Thu Jul 19, 2007 11:09 am    Post subject: Re: Best URI Structure?

Well, the thing is it's easier and safer to deal with delimiters in rewriterules.

In :

Code:
RewriteRule ^[a-z0-9_-]+/[a-z0-9_-]+/[a-z0-9_-]+-([0-9]+)\.html /script.php?id=$1[QSA,L,NC]


The slash help out to determine if the uri structure is appropriate. It looks for some text, (a-z), numbers (0-9) hyphens and underscores separated with "/", the last part ending with .html helps out to find the end of the uri string to match. The hyphen before the id helps out to locate the id to capture.

With uri like :

Code:
some-text

Code:

some-text/some-text


and :

Code:
some-text/some-text/some-text-xx


It will be a bit harder to deal with uri in the intermediate level :
Code:
some-text/some-text-xx


in the .htacess, but it's still possible. The common alternative (used by wordpress for example) is to redirect all to a single file and compute the required information (categories and items) using the $_SERVER['REQUEST_URI'] value. The idea is to match the part of the uri string to tell what content to output.

About the standards, you could do something similar to the advanced phpBB3 mod rewrite, eg only inject the parent category in the items urls :

Code:
master-cat/product-xx.html
sub-cat/product-xx.html


This would still be an interesting standard to play with, while you would never be limited by sub levels growth.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » SEO Principles
Page 1 of 1

Navigation

Jump to: