Forum Moderators: phranque
I have a website (myoldsite.com) and I want to redirect all files to my new site (mynewsite.com) using mod_rewrite in .htaccess i.e:
RewriteEngine On
RewriteRule ^(.*)$ [mynewsite.com...] [R=301,L]
However, these is one directory on my old site (myoldsite.com) that I want to be able to access without the redirect. This happens to be the cgibin which holds many perl scripts that I can't for various reasons move to the new site. (Some of the scripts have been bought and will only work within www.myoldsite.com)
Any ideas how this can be achieved?
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/cgi-bin
RewriteRule ^(.*)$ http://www.mynewsite.com/$1 [R=301,L]
[edited by: jdMorgan at 5:20 pm (utc) on Aug. 4, 2005]
[edit reason] Fixed [ code ] formatting. [/edit]