Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to redirect all Subdirectory requests to the Subdomain using .htaccess?

0 votes
asked Jun 2, 2015 in Q2A Core by gold.developer

I've been trying to redirect all Subdirectory requests to a Subdomain, so all the requests made to:

 domain.com/q2a  or  domain.com/q2a/2/ 
gets redirected to:
 q2a.domain.com  and  q2a.domain.com/2/ 

So I'm using this:

RedirectMatch 301 ^/q2a/(.*)$ http://q2a.domain.com/$1

This works well when redirecting to the Subdomain. The thing is after I being redirected the link looks something like this:


Am I not doing this the right way? Should I be doing this in other way?

Q2A version: 1.7
commented Dec 9, 2015 by wouldnotbang
Did you come up with a solution to this issue?

Please log in or register to answer this question.