- Code, Content, and Presentation
-- Apache Web Server
---- redirecting subdomain to subfolder
- 10:09 am on Sep 27, 2012
Oh, ###, that makes all the difference. The htaccess has to be located where the original request will see it. That means in the subdomain's current home, wherever it may be.
Ah, I've been placing it inside the root .htaccess of the domain, not the subdomain.
However, still no luck. Placed it inside a testing subdomain, but I just get a 404.
Since you're capturing two things from the Rule, it would be www.example.com/$1/$2 etc. But it could perfectly well also be
as a single $1 capture, since you're using both pieces in their original order.
Although there's a random bunch of numbers after the last /, I'm not actually using them in the final destination. I just need the ([a-zA-Z0-9) part to forward to the new destination of the same name.
Brought to you by