xxx.php redirected to subfolder ooo/xxx.php

Discussion in 'Apache' started by Kellerkind, Sep 25, 2006.

  1. #1
    Hi,
    would be great if anyone could help me out with this. I have my old first website before I knew about making money with websites and wrote a lot of content on it. I don't want to loose all the indexed pages but for the new system I plan to use I have to move them.

    It would be awesome if someone could tell me how to redirect all

    http://www.xyz.com/xxx.php?news_id=1915 -> http://www.xyz.com/ooo/xxx.php?news_id=1915

    I still want to run the system in the root folder just move my old site in a subfolder and most of the content can be found in the news section therefore it would be great to redirect all xxx.php pages.
     
    Kellerkind, Sep 25, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^xxx\.php\?news_id\=([^.]+)$ http://www.domain.com/ooo/xxx.php?news_id=$1 [R=301,L]
     
    Nintendo, Sep 25, 2006 IP