SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Srtipping/Ignoring part of query string

    Please can I have some helo with this 301 as I am struggling to get it working correctly:


    I want to rewrite a URL withquery string to SEO friendly one and ignore part of the query

    search_results.php?make=make&model=model&modelcode=modelcode

    301 to

    products/make/model

    basically want to ignore everything after the model value in query string

    Help would be really appreciated

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    el,

    Sorry, YOU must change your links and write the mod_rewrite code to actually serve the file you want it to serve (your mindset is backward).

    I have a very long tutorial which tells you everything you need to know about mod_rewrite - including a number of coding examples - linked in my signature.

    As for the modelcode or other strings, if you don't need them (or don't supply them to mod_rewrite in the requested links), they will not be read because they'll not be present.

    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


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
  •