.htaccess %article% redirect

Discussion in 'Apache' started by eiso, Mar 3, 2006.

  1. #1
    Hi Everyone,

    If i go to my site and i type in:

    domain.com/anything-article-anything.php
    or
    domain.com/anythingarticleanything.php

    and the files dont exist and the word "article" apears in it i would like to redirect it to:

    domain.com/articles.php?anything-article-anything
    or
    domain.com/articles.php?anythingarticleanything
    etc..

    if the word "article" does not appear in the requested url i would just like to redirect it to a 404 page.

    Is this possible in .htaccess and if so, what code do i need to use?

    Best regards,

    Eiso Kant
     
    eiso, Mar 3, 2006 IP