Page is a not externally linkable
gethan - 6:22 am on Apr 3, 2003 (gmt 0)
Then have a look here: [webmasterworld.com...] - simple example... your rules should be along the lines of (spot the q's :)) .htaccess in the olddir -> newdir directory .htaccess in the main directory Could spend some time rewriting this into a single .htaccess - my mod_rewrite is a little rusty atm though. Good luck - and I hope this sends you on the right track. === They include [webmasterworld.com...] mod_alias: permenant redirect:
First split up the directories for each host... make your problem simpler. eg. www.domain.com has a different root to domain.com.
rewriteEngine on
rewriteBase /olddir/
rewriteCond %{HTTP_HOST} ^olddomain.com$ # says must be only olddomain.com not www.olddomain.com
rewriteRule ^(.*) httq://newdomain.com/newdir/$1 [L,R=301] # gets the directory move.
rewriteEngine on
rewriteBase /
rewriteCond %{HTTP_HOST} ^olddomain.com$ # says must be only olddomain.com not www.olddomain.com
rewriteRule ^(.*) httq://newdomain.com/$1 [L,R=301] # gets the directory move.
In general (for other visitors) there are simpler methods that you should consider if:
- you don't have any deep links.
- users don't have bookmarks to deep pages.
RedirectMatch 301 /english/(.*\.html)$ htt*://www.newsite.com/$1
RedirectPermanent / httq://www.newurl.com/