1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RewriteEngine - with .htaccess ( How to transfer all requests to one file? ) HELP!

Discussion in 'BlackHat Lounge' started by 229tom, Nov 23, 2008.

  1. 229tom

    229tom Regular Member

    Joined:
    Jun 27, 2008
    Messages:
    220
    Likes Received:
    65
    I really have no idea how to actually do this,
    Could someone please tell me how could I do this thing with .htaccess
    , I wanted to re-make my website but I have 95% of traffic comming from searchengines to more then 2000 different pages but if I would do this I would lose almost all my traffic!
    So anyone could tell me how can I get this that, all requests for files what is on my domain - for example domain.com/se/43423/34qwdasd.php redirects to one main file at domain.com/index.php ? |but not only one specific directory or file but ALL Files what is on that domain!

    Thank u very much!
     
  2. wealthy199

    wealthy199 BANNED BANNED

    Joined:
    Sep 24, 2007
    Messages:
    585
    Likes Received:
    1,088
    That's easy, I do this when I perform site maintenance:
    Code:
    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !/index.php$
    RewriteRule $ /index.php [R=302,L] 
     
    • Thanks Thanks x 1
  3. 229tom

    229tom Regular Member

    Joined:
    Jun 27, 2008
    Messages:
    220
    Likes Received:
    65
    Thanks, you really are lifesaver!