Forum Moderators: phranque

Message Too Old, No Replies

redirect all but one folder to new site

         

Fourbit

5:42 am on Dec 2, 2007 (gmt 0)

10+ Year Member



I have an old established site (oldsite.tld) and would like to redirect all of it to new site (newsite.tld) with the exception of /adminfolder/ .
So, anything with oldsite.tld/adminfolder/ would stay operative and usable. But, all other requests to oldsite.tld/...... would go to newsite.tld .

Thanks,

Never fails. Just when I give up on search and make a post I find the answer. :(

RewriteEngine on
RewriteCond $1!^the/pathto/the/directory
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

SOrry

[edited by: Fourbit at 6:00 am (utc) on Dec. 2, 2007]

[edited by: encyclo at 8:36 pm (utc) on Dec. 2, 2007]
[edit reason] switched to example.com [/edit]

g1smd

12:55 am on Dec 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'll bet that after you log in to the admin area, the next URLs are again redirected (unless logging in takes you to a different subdomain or something).