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

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -