Help on how to Jump back to Original URL if character missing using mod rewrite.

Discussion in 'Apache' started by texastez, Apr 17, 2010.

  1. #1
    I would like someone to have a look at the following URL:
    http://www.holidaylettings.co.uk/rentals/mijas-costa/22122

    And explain to my how I can achieve the following:
    If you enter the above URL into your browser and remove any character or several characters from either the word rentals or the word mijas-costa and hit the enter/return key the URL above automatically jumps back to the original one.

    Example:
    http://www.holidaylettings.co.uk/reals/mijas-costa/22122 (couple of letter taken out of the word rentals)
    http://www.holidaylettings.co.uk/rentals/mijsta/22122 (couple letters taken out of mijas-costa)

    but after hitting the enter key on keyboard

    Both incorrect urls jump back to the original;
    http://www.holidaylettings.co.uk/rentals/mijas-costa/22122

    I presume this is done with mod rewrite and .htaccess
    I would be very grateful if someone could please tell me how?
     
    texastez, Apr 17, 2010 IP