regex redirect to other domain fails
-
i want to redirect all of the urls that contain a specific word to another domain.
http://www.mysite.com/online-tickets
http://www.mysite.com/tickets/buy
http://www.mysite.com/expensive-tickets-sale
etc…
should redirect to http://tickets.example.comso it should be easy…
so i create a redirect from “tickets” (with regex enabled) to http://tickets.example.com
unfortunately this fails – from
http://www.mysite.com/tickets/buy
i get redirected to http://www.mysite.com/http://tickets.example.com/buy
and then a redirect loop with repeating replacing “tickets” inside the url…
Is this a bug? (looks like a bug)…
If i disable regex http://www.mysite.com/tickets does properly redirect to http://tickets.example.com
I’m using wordpress redirection (my server doesn’t support anything else)
- The topic ‘regex redirect to other domain fails’ is closed to new replies.