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 for specific url

Discussion in 'Apache' started by juancito, Apr 19, 2004.

  1. #1
    hi guys... nice forum going on here :)
    ok.. I've searched every topic about this almost close to what I need but I can't find the solution..
    what I want to do is redirect an url to another one..

    for example:

    hxxp://www.mysite.com/in8/index.php?cat=1&start=10&t=sub_pages&link_order_c=link_name&link_sort_c=asc

    to

    hxxp://www.mysite.com/index.php?module=PostWrap&page=action

    If I could just specify which url redirect to where.. would be fantastic...

    can this be done?

    I don't need a wildcard directive for this... as it is not this only url.. it can be
    hxxp://www.mysite.com/in8/index.php?cat=2&start=10&t=sub_pages&link_order_c=link_name&link_sort_c=asc
    (note cat=2 instead of cat=1)

    to redirect to

    hxxp://www.mysite.com/index.php?module=PostWrap&page=action2

    thank you!
     
    juancito, Apr 19, 2004 IP
  2. hexed

    hexed Peon

    Messages:
    333
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you use mod_rewrite, you will still need the values in your URL. Take this for example:

    http://www.domain.com/main.php?item=1&item2=cows

    can be reformed as:

    http://www.domain.com/1/cows/main.html

    Notice the /1/ and /cows/. You need the values somewhere in your URL in order to parse them.

    I'm a guru with mod_rewrite, send me a line at

    ryan /at/ edsolutions.ca

    replace the /at/ with @. Did this so I don't get picked up by email harvesters.
     
    hexed, Apr 19, 2004 IP
  3. juancito

    juancito Well-Known Member

    Messages:
    191
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #3
    hi Hexed.. can you help me out with the .htaccess file? I'm clueless on this matter :(
     
    juancito, Apr 19, 2004 IP