Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

URL rewriting

Options
  • 16-07-2008 2:41pm
    #1
    Registered Users Posts: 4,475 ✭✭✭


    I'm about to undertake a project to implement SEO friendly links on my client's site. Their big idea is to take the current URL for say a product, www.xxxx.com/product.aspx?l1=700&l2=701&l3=965&l4=&p_id=31208 and rewrite it to www.xxxx.com/makeup/eyes/mascara/productname. I know the concepts, etc and even messed around a little with mod_rewrite at home (the server is an IIS server so we'll be using ISAPI_REWRITE). However, I'm a little daunted by the size of the project, and don't want to forget about something that could kill it dead or drag it on for weeks.

    1. instigate rewriting so any links to www.xxxx.com/makeup/eyes/mascara/productname are found correctly
    2. use a mapfile for converting categories and products to codes used in the db
    3. change all internal links on the site to use rewritten URLs
    4. change processes that generate links to the site from emails, etc to use rewritten URLs

    Is there anything else that I should be thinking about? I know it's probably an unfair question given none of you know anything about the site, but for a general task of rewiting an existing large-scale site, is there anything I'm just plum forgetting?


Comments

  • Registered Users Posts: 1,127 ✭✭✭smcelhinney


    Hmm

    Another concern would be the hierarchy of categories. Do all products have 3 parent categories? Do some have more/less? Would your maptable accomplish this validation?


  • Registered Users Posts: 4,475 ✭✭✭corblimey


    Hmm

    Another concern would be the hierarchy of categories. Do all products have 3 parent categories? Do some have more/less? Would your maptable accomplish this validation?

    Well the first step would be getting a full list of all possible parameters into the page and generating a rewrite rule for each possible URL construct. I'll have I think 4 different mapfiles, one for each level of the category hierarchy (although each category regardless of the level it's on has a unique id, so this might be overkill) and one for the product list.


  • Registered Users Posts: 4,475 ✭✭✭corblimey


    I've started looking into this, and it's looking to be too big a job for now, but I just need to confirm something. Following the example above, do I need to go ahead and change all internal links to the new format. I thought I've seen a rewrite rule that will first check for the standard rewrite and if that fails, then it checks for the old format. I can't find the example now, so I'm not sure. If this is possible, could I avoid changing internal links completely?
    (pseudo)
    rewriterule /{1}/[2}/[3]/ product.aspx?l1={1}&l4={2}&p_id={3} 
    rewriterule product.aspx?l1={1}&l4={2}&p_id={3} /{1}/[2}/[3]/
    
    So if the browser comes along and see markeup/eyes/mascara, it knows to rewrite as product.aspx?l1=&l2=&p_id= and stops. If it finds a product.aspx?l1=&l2=&p_id=, it refreshes to markeup/eyes/mascara and loops back around. Is this possible? Will it "fool" Google, or will it count 2 sets of links, the rewritten one and the standard one?

    Or is this all nonsense, and I'll need to change all internal links to use the new format?


Advertisement