Link to home
Start Free TrialLog in
Avatar of thierry91
thierry91

asked on

how to create redirect 301 and change url

hello,
I have hosted web site. and all are before in same server.
any hosted web site can before have 2 url :
http://www.domaine.com/<hosted-web-site>/
or
http://<hosted-web-site>/.domaine.com/

and this because i have make this in my conf apache :
---------------------------------------------------------------------------------
RewriteMap              lowercase                               int:tolower
RewriteRule             ^(.*)                                   %{HTTP_HOST}$1  

RewriteCond       /data/www/$1/${lowercase:$2}           -d
RewriteRule       ^www\.([^./]+)\.[^/.]+/([^/]+)(.*)$    /data/www/$1/${lowercase:$2}$3         [L]

RewriteCond       /data/www/$1/${lowercase:$2}           -d
RewriteRule       ^([^/]+)\.[^/.]+/([^/]+)(.*)$         /data/www/$1/${lowercase:$2}$3         [L]

RewriteRule       ^([^/]+)\.([^/.]+)\.[^/]+(.*)$        /data/www/$2/$1$3                [L]
RewriteRule       ^([^./]+)\.[^/.]+(.*)$                 /data/www/$1/www$2               [L]
---------------------------------------------------------------------------------

But now I have move all my www.domaines.com to other server
and all web site I hosted free are hosted in others servers.
this create problem ! and now all url "http://www.domaine.com/<hosted-web-site>/"   not work
normal, because the www is now in other server.

my questions are:
what can I make for solve this problem ?
what make for make 301 redirect but only for hosted web site and not all for all error page ?

cordialy
thierry

ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial