apache - Redirect all but 2 links to new URL -
i have domain.de , domain.com. in past have used both domains, want use domain.de , domain.com should redirect domain.de/en. there 2 links need domain.de/api/xx1 + domain.de/api/xx2 (so without /en). tried following:
<if "%{http_host} = 'domain.com'"> redirect /api/xx1 http://domain.de/api/xx1 redirect /api/xx2 http://domain.de/api/xx2 redirect / http://www.domain.de/en </if> but redirects .de/en , ignores 2 links, how change works?
the usage of redirectmatch like:
redirectmatch 301 "^/((?!api).*)" http://www.domain.de/en/$1
Comments
Post a Comment