catchall redirect domain that shows original url entered?

Discussion in 'HTML & JavaScript' started by beer30, Aug 29, 2010.

  1. beer30

    beer30 BANNED BANNED

    Joined:
    Aug 13, 2009
    Messages:
    204
    Likes Received:
    48
    What I'm looking for is a way to have any page request my domain gets show the index BUT keep whatever url the person originally entered in the address bar.

    Example I type www.sitea.c0m/abc123/ in my address bar I want the redirect to take them to www.sitea.c0m but still show www.sitea.c0m/abc123/ in the address bar.

    Seems like I've seen it done before but not knowing the correct name for it I can't seem to find how to do it by searching google or on here.
     
  2. ostermeier

    ostermeier Newbie

    Joined:
    Apr 14, 2010
    Messages:
    19
    Likes Received:
    9
    Place the following in your .htaccess file. Any extensions listed will not redirect.

    Code:
    RewriteRule !\.(gif|jpg|png|css|pdf|xml|doc|xls|swf|txt|gz|bz2|ico)$ /siteroot/index.php