1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

mod rewrite question

Discussion in 'Apache' started by bryanfilm, May 28, 2009.

  1. #1
    I have replication site system that I purchased that I want to set up for multiple customers. Currently it requires me to set up a product category so the url for my customer would look like this "www.mysite.com/product/customername" I want a user to just be able to type in www.mysite.com/customername. Would this be possible to do with a mod_rewrite to have the server direct a user to the correct directory even if they just have the customername after the domain name? I am a newbie and would appreciate any help.

    Thanks
     
    bryanfilm, May 28, 2009 IP
  2. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    as long as there aren't any other filenames that would go after the domain that,

    a) have no extension (such as .php) or
    b) have a number

    Otherwise it will be hard to match,

    So www.mysite.com/about
    will redirect even though it isn't supposed to.
     
    Lpe04, May 29, 2009 IP
  3. bryanfilm

    bryanfilm Peon

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks but how would I actually code it in the .htaccess file?
     
    bryanfilm, Jun 9, 2009 IP