#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Posts
    70
    Rep Power
    4

    How to mod_rewrite mirror subfolder to subfolder


    I searched the forum and couldn't find what I was looking for, but I am trying to find a mod_rewrite rule so that if i have a site on:

    http://www.example.com/originalsite/subfolder
    (/var/www/vhosts/example.com/httpdocs/originalsite/subfolder)

    I want to mirror this site on:

    http://www.example.com/newsite

    ------------

    I apologize if this is basic, but I have very limited (301 redirect) knowledge of all things htaccess/vhost. Thanks very much for any help!

    p.s. i checked the sticky'd thread and didn't see anything like this.
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Assuming newsite is a non-existent folder in /var/www/vhosts/example.com/httpdocs:[code=example.com/.htaccess]RewriteRule ^newsite(/.*)?$ /originalsite/subfolder$1 [L][/code]You may need to also have the following:[code=example.com/originalsite/subfolder/.htaccess]RewriteEngine Off[/code]
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.

IMN logo majestic logo threadwatch logo seochat tools logo